diff --git a/backend/src/middleware/notifications/notificationsMiddleware.mentions-in-groups.spec.ts b/backend/src/middleware/notifications/notificationsMiddleware.mentions-in-groups.spec.ts index 575a2e86d..8bddff733 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.mentions-in-groups.spec.ts +++ b/backend/src/middleware/notifications/notificationsMiddleware.mentions-in-groups.spec.ts @@ -316,24 +316,32 @@ describe('mentions in groups', () => { }), ).resolves.toMatchObject({ data: { - notifications: [ + notifications: expect.arrayContaining([ { + createdAt: expect.any(String), from: { __typename: 'Post', id: 'public-post', + content: + 'Hey
@no-meber
@pending-member
@group-member.
! Please read this', }, read: false, reason: 'post_in_group', + relatedUser: null, }, { + createdAt: expect.any(String), from: { __typename: 'Post', id: 'public-post', + content: + 'Hey
@no-meber
@pending-member
@group-member.
! Please read this', }, read: false, reason: 'mentioned_in_post', + relatedUser: null, }, - ], + ]), }, errors: undefined, }) @@ -404,24 +412,32 @@ describe('mentions in groups', () => { }), ).resolves.toMatchObject({ data: { - notifications: [ + notifications: expect.arrayContaining([ { + createdAt: expect.any(String), from: { __typename: 'Post', id: 'closed-post', + content: + 'Hey members
@no-meber
@pending-member
@group-member.
! Please read this', }, read: false, reason: 'post_in_group', + relatedUser: null, }, { + createdAt: expect.any(String), from: { __typename: 'Post', id: 'closed-post', + content: + 'Hey members
@no-meber
@pending-member
@group-member.
! Please read this', }, read: false, reason: 'mentioned_in_post', + relatedUser: null, }, - ], + ]), }, errors: undefined, }) @@ -492,24 +508,32 @@ describe('mentions in groups', () => { }), ).resolves.toMatchObject({ data: { - notifications: [ + notifications: expect.arrayContaining([ { + createdAt: expect.any(String), from: { __typename: 'Post', id: 'hidden-post', + content: + 'Hey hiders
@no-meber
@pending-member
@group-member.
! Please read this', }, read: false, reason: 'post_in_group', + relatedUser: null, }, { + createdAt: expect.any(String), from: { __typename: 'Post', id: 'hidden-post', + content: + 'Hey hiders
@no-meber
@pending-member
@group-member.
! Please read this', }, read: false, reason: 'mentioned_in_post', + relatedUser: null, }, - ], + ]), }, errors: undefined, })