#29 Implement Workgroup members routes (Add, remove, update)

This commit is contained in:
2020-03-15 20:13:10 +01:00
parent f277613820
commit 8ad0281003
8 changed files with 195 additions and 17 deletions

View File

@@ -76,6 +76,13 @@ begin
assert not members::jsonb @> jsonb_build_array(jsonb_build_object('id', _citizen_id2)),
'Members must NOT contain citizen2';
select m into members from find_workgroup_members((created_workgroup->>'id')::uuid) m;
assert json_array_length(members) = 1, 'The members count must be equal to 1';
assert members::jsonb @> jsonb_build_array(jsonb_build_object('id', _citizen_id)),
'Members must contain citizen1';
assert not members::jsonb @> jsonb_build_array(jsonb_build_object('id', _citizen_id2)),
'Members must NOT contain citizen2';
rollback;
raise notice 'workgroup test pass';
end