Chatwoot/app/javascript/dashboard/store/modules/specs/contactLabels/getters.spec.js
Sivin Varghese d21c1c773b
feat: Ability to add label for contact page (#2350)
* feat: Ability to add label for contact page

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
2021-06-14 10:36:00 +05:30

24 lines
503 B
JavaScript

import { getters } from '../../contactLabels';
describe('#getters', () => {
it('getContactLabels', () => {
const state = {
records: { 1: ['customer-success', 'on-hold'] },
};
expect(getters.getContactLabels(state)(1)).toEqual([
'customer-success',
'on-hold',
]);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
isFetching: true,
},
};
expect(getters.getUIFlags(state)).toEqual({
isFetching: true,
});
});
});