diff --git a/app/soapbox/reducers/__tests__/notifications-test.js b/app/soapbox/reducers/__tests__/notifications-test.js index 4accbba2c..48c896892 100644 --- a/app/soapbox/reducers/__tests__/notifications-test.js +++ b/app/soapbox/reducers/__tests__/notifications-test.js @@ -219,4 +219,34 @@ describe('notifications reducer', () => { })); }); + it('should handle NOTIFICATIONS_UPDATE_QUEUE', () => { + const state = ImmutableMap({ + items: ImmutableList(), + queuedNotifications: take(notifications, 3), + totalQueuedNotificationsCount: 3, + }); + //const notification = notification; + const action = { + type: actions.NOTIFICATIONS_UPDATE_QUEUE, + notification: notification, + intlMessages: null, + intlLocale: 'en', + }; + expect(reducer(state, action)).toEqual(ImmutableMap({ + items: ImmutableList([ + ImmutableMap({ + id: '10744', + type: 'pleroma:emoji_reaction', + account: '9vMAje101ngtjlMj7w', + created_at: '2020-06-10T02:54:39.000Z', + status: '9vvNxoo5EFbbnfdXQu', + emoji: '😢', + is_seen: false, + }), + ]), + top: false, + unread: 2, + })); + }); + });