Files
Shivam Mishra bce2a07d03 feat: do not send contact details to the widget (#9223)
* refactor: use has_email instead of email

* feat: remove usage of details directly in forms

* test: update payload

* test: fix transcript test

* refactor: use computed hasEmail

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-04-12 15:30:07 +05:30

22 lines
461 B
JavaScript

import { getters } from '../../contacts';
describe('#getters', () => {
it('getCurrentUser', () => {
const user = {
has_email: true,
has_name: true,
avatar_url: '',
identifier_hash: 'malana_hash',
};
const state = {
currentUser: user,
};
expect(getters.getCurrentUser(state)).toEqual({
has_email: true,
has_name: true,
avatar_url: '',
identifier_hash: 'malana_hash',
});
});
});