mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
fix: update root role test
This commit is contained in:
parent
563345695d
commit
fb109d79a6
@ -615,14 +615,10 @@ test('should set root role for user', async () => {
|
|||||||
await accessService.setUserRootRole(user.id, editorRole.id);
|
await accessService.setUserRootRole(user.id, editorRole.id);
|
||||||
|
|
||||||
const roles = await accessService.getRolesForUser(user.id);
|
const roles = await accessService.getRolesForUser(user.id);
|
||||||
roles.sort((x, y) => {
|
|
||||||
return x.name.localeCompare(y.name);
|
|
||||||
});
|
|
||||||
|
|
||||||
//To have duplicated roles like this may not may not be a hack. Needs some thought
|
//To have duplicated roles like this may not may not be a hack. Needs some thought
|
||||||
expect(roles[0].name).toBe(RoleName.EDITOR);
|
expect(roles[0].name).toBe(RoleName.EDITOR);
|
||||||
expect(roles[1].name).toBe(RoleName.VIEWER);
|
|
||||||
expect(roles.length).toBe(2);
|
expect(roles.length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should switch root role for user', async () => {
|
test('should switch root role for user', async () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user