mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-28 21:01:02 +08:00
* 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 <[email protected]>
22 lines
461 B
JavaScript
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',
|
|
});
|
|
});
|
|
});
|