Skip to content

Commit e2d6ae0

Browse files
committed
tests
1 parent 03c5d8f commit e2d6ae0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/rls-demo/__tests__/rls.demo.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('RLS Demo - Data Insertion', () => {
5454

5555
expect(user1.email).toBe('[email protected]');
5656
expect(product1.name).toBe('Laptop Pro');
57-
expect(product1.owner_id).toBe(user1.id);
57+
expect(product1.owner_id).toEqual(user1.id);
5858
});
5959

6060
it('should query user products with joins', async () => {

packages/rls-demo/deploy/rls-demo.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ AS $$
2828
);
2929
$$;
3030

31+
-- Grant permissions on auth schema and functions to public
32+
GRANT USAGE ON SCHEMA auth TO public;
33+
GRANT EXECUTE ON FUNCTION auth.uid() TO public;
34+
GRANT EXECUTE ON FUNCTION auth.role() TO public;
35+
3136
-- Create rls_test schema
3237
CREATE SCHEMA IF NOT EXISTS rls_test;
3338

0 commit comments

Comments
 (0)