Chatwoot/app/javascript/dashboard/store/modules/specs/campaigns/getters.spec.js
2021-05-04 15:08:41 +05:30

22 lines
495 B
JavaScript

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,
});
});
});