Chatwoot/app/javascript/dashboard/store/modules/specs/campaigns/getters.spec.js

23 lines
495 B
JavaScript
Raw Normal View History

2021-05-04 09:38:41 +00:00
import { getters } from '../../campaigns';
import campaigns from './fixtures';
describe('#getters', () => {
it('getCampaigns', () => {
const state = { records: campaigns };
expect(getters.getCampaigns(state)).toEqual(campaigns);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
isFetching: true,
isCreating: false,
},
};
expect(getters.getUIFlags(state)).toEqual({
isFetching: true,
isCreating: false,
});
});
});