Chatwoot/app/javascript/dashboard/store/modules/specs/webhooks/getters.spec.js
Nithin David Thomas c119c6577b
Feature: As a admin, I should be able to add webhooks to account (#572)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
2020-02-29 17:43:49 +05:30

30 lines
677 B
JavaScript

import { getters } from '../../webhooks';
import webhooks from './fixtures';
describe('#getters', () => {
it('getInboxes', () => {
const state = {
records: webhooks,
};
expect(getters.getWebhooks(state)).toEqual(webhooks);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
fetchingList: false,
fetchingItem: false,
creatingItem: false,
updatingItem: false,
deletingItem: false,
},
};
expect(getters.getUIFlags(state)).toEqual({
fetchingList: false,
fetchingItem: false,
creatingItem: false,
updatingItem: false,
deletingItem: false,
});
});
});