committed by
GitHub
parent
d8d14fc4a4
commit
b1aab228ae
@@ -21,4 +21,16 @@ describe('#actions', () => {
|
||||
expect(commit.mock.calls).toEqual([]);
|
||||
});
|
||||
});
|
||||
describe('#muteConversation', () => {
|
||||
it('sends correct actions if API is success', async () => {
|
||||
axios.get.mockResolvedValue(null);
|
||||
await actions.muteConversation({ commit }, 1);
|
||||
expect(commit.mock.calls).toEqual([[types.default.MUTE_CONVERSATION]]);
|
||||
});
|
||||
it('sends correct actions if API is error', async () => {
|
||||
axios.get.mockRejectedValue({ message: 'Incorrect header' });
|
||||
await actions.getConversation({ commit });
|
||||
expect(commit.mock.calls).toEqual([]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user