8cf05f1d9f
Ability to edit contact information in conversation sidebar Co-authored-by: Sojan <sojan@pepalo.com>
17 lines
482 B
JavaScript
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',
|
|
});
|
|
});
|
|
});
|