feat: Ability to unmute muted conversations (#1319)

This commit is contained in:
Dmitriy Shcherbakan 2020-10-08 09:32:08 +03:00 committed by GitHub
parent 2aad33a5be
commit ecebe163e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 242 additions and 0 deletions

View file

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