1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: fix failing group service test (#4642)

This commit is contained in:
Jaanus Sellin 2023-09-08 11:32:21 +03:00 committed by GitHub
parent c59b83b07b
commit bc0c6fcb62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,19 +106,25 @@ test('adding a root role to a group with a project role should not fail', async
await stores.accessStore.addGroupToRole(group.id, 1, 'test', 'default');
await expect(() => {
return groupService.updateGroup(
{
id: group.id,
name: group.name,
users: [],
rootRole: 1,
createdAt: new Date(),
createdBy: 'test',
},
'test',
);
}).not.toThrow();
const updatedGroup = await groupService.updateGroup(
{
id: group.id!,
name: group.name,
users: [],
rootRole: 1,
createdAt: new Date(),
createdBy: 'test',
},
'test',
);
expect(updatedGroup).toMatchObject({
description: group.description,
id: group.id,
mappingsSSO: [],
name: group.name,
rootRole: 1,
});
expect.assertions(1);
});