edit notifications-test

merge-requests/106/head
Curtis ROck 4 years ago
parent d415a432d2
commit d2e2d52a0d

@ -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,
}));
});
});

Loading…
Cancel
Save