Feature: Send chat transcript via email (#1152)

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Sojan Jose
2020-08-17 11:25:13 +05:30
committed by GitHub
parent 4b70e4e3d6
commit 22880df429
31 changed files with 559 additions and 59 deletions

View File

@@ -177,4 +177,16 @@ describe('#actions', () => {
expect(commit.mock.calls).toEqual([]);
});
});
describe('#sendEmailTranscript', () => {
it('sends correct mutations if api is successful', async () => {
axios.post.mockResolvedValue({});
await actions.sendEmailTranscript(
{ commit },
{ conversationId: 1, email: 'testemail@example.com' }
);
expect(commit).toHaveBeenCalledTimes(0);
expect(commit.mock.calls).toEqual([]);
});
});
});