0
Fork 0
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:
Charles Zhao 2024-04-16 11:07:10 +08:00 committed by GitHub
parent 94b62fb0b4
commit 49b60af093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);