Chatwoot/app/javascript/dashboard/store/modules/specs/teamMembers/getters.spec.js
Nithin David Thomas 6a614a520b
chore: Sets up store for teams settings page (#1727)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-02-04 13:19:59 +05:30

30 lines
659 B
JavaScript

import { getters } from '../../teamMembers';
import teamMembers from './fixtures';
describe('#getters', () => {
it('getTeamMembers', () => {
const state = {
records: {
1: [teamMembers[0]],
},
};
expect(getters.getTeamMembers(state)(1)).toEqual([teamMembers[0]]);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
isFetching: false,
isCreating: false,
isUpdating: false,
isDeleting: false,
},
};
expect(getters.getUIFlags(state)).toEqual({
isFetching: false,
isCreating: false,
isUpdating: false,
isDeleting: false,
});
});
});