UBERF-11411: Update test

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artem Savchenko 2025-06-03 11:41:45 +07:00
parent 44cb00cbaa
commit 592cf1f9d8

View File

@ -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,