From dfd7107714f26a260c01bb8497affa763b5778a4 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 17 Jul 2023 20:37:52 +0200 Subject: [PATCH] remove unused ubscription test, fix subscription params in test --- backend/src/schema/resolvers/messages.spec.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/backend/src/schema/resolvers/messages.spec.ts b/backend/src/schema/resolvers/messages.spec.ts index 14ed9890a..1679b0c34 100644 --- a/backend/src/schema/resolvers/messages.spec.ts +++ b/backend/src/schema/resolvers/messages.spec.ts @@ -144,7 +144,7 @@ describe('Message', () => { }) expect(pubsubSpy).toBeCalledWith('ROOM_COUNT_UPDATED', { roomCountUpdated: '1', - user: 'other-chatting-user', + userId: 'other-chatting-user', }) }) @@ -325,18 +325,6 @@ describe('Message', () => { }) }) - it('sends two subscriptions', () => { - expect(pubsubSpy).toBeCalledTimes(2) - expect(pubsubSpy).nthCalledWith(1, 'ROOM_COUNT_UPDATED', { - roomCountUpdated: '1', - user: 'chatting-user', - }) - expect(pubsubSpy).nthCalledWith(2, 'ROOM_COUNT_UPDATED', { - roomCountUpdated: '1', - user: 'other-chatting-user', - }) - }) - it('returns the messages', async () => { await expect( query({