Update SQL tests and schema definitions for membership and invitation management

This commit includes updates to the SQL tests for the database layer handling memberships and invitations. Test cases are improved and expanded. It also introduces some changes to the underlying schema, including creation of new indices on the 'accounts' table and several adjustments to function definitions with regard to how user IDs are accessed. Also, some views related to user accounts are redefined for better data handling.
This commit is contained in:
giancarlo
2024-05-08 17:16:33 +07:00
parent 25abe83dfa
commit a501bb5444
3 changed files with 70 additions and 30 deletions

View File

@@ -45,6 +45,11 @@ select is(
'The member can check if they have a role on the account'
);
select isnt_empty(
$$ select * from public.get_account_members('makerkit') $$,
'The member can query the team account memberships using the get_account_members function'
);
select tests.authenticate_as('test');
-- Foreigners
@@ -77,6 +82,11 @@ select is_empty(
'The foreigner cannot query the team account'
);
select is_empty(
$$ select * from public.get_account_members('makerkit') $$,
'The foreigner cannot query the team members'
);
select * from finish();
rollback;
rollback;