further solved tests

This commit is contained in:
Claus-Peter Huebner 2023-06-30 23:29:57 +02:00
parent faf86f95b9
commit 4ccf687a63

View File

@ -1687,13 +1687,16 @@ describe('UserResolver', () => {
}),
).resolves.toEqual(
expect.objectContaining({
errors: [new GraphQLError('User is already admin')],
errors: [new GraphQLError('User already has role=')],
}),
)
})
it('logs the error thrown', () => {
expect(logger.error).toBeCalledWith('User is already admin')
expect(logger.error).toBeCalledWith(
'User already has role=',
ROLE_NAMES.ROLE_NAME_ADMIN,
)
})
})