From bc0c6fcb62ca5fda5d78955a03b7edba78d57022 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Fri, 8 Sep 2023 11:32:21 +0300 Subject: [PATCH] fix: fix failing group service test (#4642) --- .../e2e/services/group-service.e2e.test.ts | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/test/e2e/services/group-service.e2e.test.ts b/src/test/e2e/services/group-service.e2e.test.ts index e81c4358df..37ab999c75 100644 --- a/src/test/e2e/services/group-service.e2e.test.ts +++ b/src/test/e2e/services/group-service.e2e.test.ts @@ -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); });