mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
chore(test): improve organization user test stability (#5717)
This commit is contained in:
parent
94b62fb0b4
commit
49b60af093
1 changed files with 6 additions and 1 deletions
|
@ -275,7 +275,12 @@ describe('organization user APIs', () => {
|
|||
// Assign role1 to user
|
||||
await organizationApi.addUserRoles(organization.id, user.id, [role1.id]);
|
||||
const scopes = await organizationApi.getUserOrganizationScopes(organization.id, user.id);
|
||||
expect(scopes.map(({ name }) => name)).toMatchObject([scope1.name, scope2.name]);
|
||||
expect(
|
||||
scopes
|
||||
.map(({ name }) => name)
|
||||
.slice()
|
||||
.sort()
|
||||
).toEqual([scope1.name, scope2.name].slice().sort());
|
||||
|
||||
// Remove role1 and assign role2 to user
|
||||
await organizationApi.deleteUserRole(organization.id, user.id, role1.id);
|
||||
|
|
Loading…
Add table
Reference in a new issue