fix: Resolve conversation with id instead of current conversation (#2731)

This commit is contained in:
Pranav Raj S
2021-08-02 13:11:07 +05:30
committed by GitHub
parent 9f3f238cb5
commit d88e3e3596
5 changed files with 54 additions and 8 deletions

View File

@@ -214,6 +214,22 @@ describe('#actions', () => {
});
});
describe('#toggleStatus', () => {
it('sends correct mutations if toggle status is successful', async () => {
axios.post.mockResolvedValue({
data: { payload: { conversation_id: 1, current_status: 'resolved' } },
});
await actions.toggleStatus(
{ commit },
{ conversationId: 1, status: 'resolved' }
);
expect(commit).toHaveBeenCalledTimes(1);
expect(commit.mock.calls).toEqual([
['RESOLVE_CONVERSATION', { conversationId: 1, status: 'resolved' }],
]);
});
});
describe('#assignTeam', () => {
it('sends correct mutations if assignment is successful', async () => {
axios.post.mockResolvedValue({