mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 09:20:54 +00:00
UBERF-11411: Update test
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
parent
44cb00cbaa
commit
592cf1f9d8
@ -141,9 +141,10 @@ describe('ChannelCache', () => {
|
||||
const error = new Error('Database error')
|
||||
mockClient.findOne.mockRejectedValue(error)
|
||||
|
||||
const result = await channelCache.getOrCreateChannel(spaceId, participants, emailAccount, personId)
|
||||
await expect(channelCache.getOrCreateChannel(spaceId, participants, emailAccount, personId))
|
||||
.rejects
|
||||
.toThrow('Failed to create channel for test@example.com in space test-space-id: Database error')
|
||||
|
||||
expect(result).toBeUndefined()
|
||||
expect(mockCtx.error).toHaveBeenCalledWith('Failed to create channel', {
|
||||
me: emailAccount,
|
||||
space: spaceId,
|
||||
|
Loading…
Reference in New Issue
Block a user