Update test cases and improve account actioning
This commit refactors Supabase test cases to reflect the updated account actioning mechanism. The "makerkit.get_user_id" function calls were replaced with the new "tests.get_supabase_uid" function, aligning with the testing structure update. It also introduces new policies which further refine user role actions with more precise checks, replacing the old 'delete' policy with the more comprehensive 'can_action_account_member' function. New test cases for updating memberships and deleting memberships have also been added.
This commit is contained in:
@@ -75,7 +75,7 @@ select throws_ok(
|
||||
update public.accounts_memberships
|
||||
set account_role = 'custom-role'
|
||||
where account_id = makerkit.get_account_id_by_slug('test')
|
||||
and user_id = makerkit.get_user_id('test1@test.com');
|
||||
and user_id = tests.get_supabase_uid('test1');
|
||||
|
||||
set local role postgres;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user