chore: Add the specs for sort conversation (#7047)

This commit is contained in:
Muhsin Keloth
2023-05-10 17:49:17 +05:30
committed by GitHub
parent 65bad90b69
commit 55e5fa2205
3 changed files with 147 additions and 13 deletions

View File

@@ -404,6 +404,33 @@ describe('#actions', () => {
expect(commit.mock.calls).toEqual([[types.CLEAR_CONVERSATION_FILTERS]]);
});
});
describe('#updateConversationLastActivity', () => {
it('sends correct action', async () => {
await actions.updateConversationLastActivity(
{ commit },
{ conversationId: 1, lastActivityAt: 12121212 }
);
expect(commit.mock.calls).toEqual([
[
'UPDATE_CONVERSATION_LAST_ACTIVITY',
{ conversationId: 1, lastActivityAt: 12121212 },
],
]);
});
});
describe('#setChatSortFilter', () => {
it('sends correct action', async () => {
await actions.setChatSortFilter(
{ commit },
{ data: 'sort_on_created_at' }
);
expect(commit.mock.calls).toEqual([
['CHANGE_CHAT_SORT_FILTER', { data: 'sort_on_created_at' }],
]);
});
});
});
describe('#deleteMessage', () => {