Chatwoot/app/javascript/shared/helpers/specs/CustomErrors.spec.js
Pranav Raj S 8cf05f1d9f
feat: Ability to edit a contact (#1092)
Ability to edit contact information in conversation sidebar

Co-authored-by: Sojan <sojan@pepalo.com>
2020-08-23 00:05:07 +05:30

17 lines
482 B
JavaScript

const { DuplicateContactException } = require('../CustomErrors');
describe('DuplicateContactException', () => {
it('returns correct exception', () => {
const exception = new DuplicateContactException({
id: 1,
name: 'contact-name',
email: 'email@example.com',
});
expect(exception.message).toEqual('DUPLICATE_CONTACT');
expect(exception.data).toEqual({
id: 1,
name: 'contact-name',
email: 'email@example.com',
});
});
});