Skip to content

Commit 4767efd

Browse files
check more commands
1 parent fd8f91d commit 4767efd

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

crates/pgt_schema_cache/src/policies.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,25 @@ mod tests {
106106
name varchar(255) not null
107107
);
108108
109+
-- multiple policies to test various commands
109110
create policy public_policy
110111
on public.users
111112
for select
112113
to public
113114
using (true);
114115
116+
create policy public_policy_del
117+
on public.users
118+
for delete
119+
to public
120+
using (true);
121+
122+
create policy public_policy_ins
123+
on public.users
124+
for insert
125+
to public
126+
with check (true);
127+
115128
create policy admin_policy
116129
on public.users
117130
for all
@@ -157,7 +170,7 @@ mod tests {
157170
.filter(|p| p.schema_name == "public")
158171
.count();
159172

160-
assert_eq!(public_policies, 2);
173+
assert_eq!(public_policies, 4);
161174

162175
let real_estate_policies = cache
163176
.policies

0 commit comments

Comments
 (0)