feat: Ability to unmute muted conversations (#1319)
This commit is contained in:
parent
2aad33a5be
commit
ecebe163e1
13 changed files with 242 additions and 0 deletions
|
@ -14,7 +14,32 @@ describe('#ConversationAPI', () => {
|
|||
expect(conversationAPI).toHaveProperty('markMessageRead');
|
||||
expect(conversationAPI).toHaveProperty('toggleTyping');
|
||||
expect(conversationAPI).toHaveProperty('mute');
|
||||
expect(conversationAPI).toHaveProperty('unmute');
|
||||
expect(conversationAPI).toHaveProperty('meta');
|
||||
expect(conversationAPI).toHaveProperty('sendEmailTranscript');
|
||||
});
|
||||
|
||||
describe('API calls', () => {
|
||||
let originalAxios = null;
|
||||
let axiosMock = null;
|
||||
|
||||
beforeEach(() => {
|
||||
originalAxios = window.axios;
|
||||
axiosMock = { post: jest.fn(() => Promise.resolve()) };
|
||||
|
||||
window.axios = axiosMock;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
window.axios = originalAxios;
|
||||
});
|
||||
|
||||
it('#unmute', () => {
|
||||
conversationAPI.unmute(45);
|
||||
|
||||
expect(axiosMock.post).toHaveBeenCalledWith(
|
||||
'/api/v1/conversations/45/unmute'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue