Chatwoot/app/javascript/widget/store/modules/specs/appConfig/actions.spec.js

21 lines
590 B
JavaScript
Raw Normal View History

import { actions } from '../../appConfig';
const commit = jest.fn();
describe('#actions', () => {
describe('#setReferrerHost', () => {
it('creates actions properly', () => {
actions.setReferrerHost({ commit }, 'www.chatwoot.com');
expect(commit.mock.calls).toEqual([
['SET_REFERRER_HOST', 'www.chatwoot.com'],
]);
});
});
describe('#setWidgetColor', () => {
it('creates actions properly', () => {
actions.setWidgetColor({ commit }, '#eaeaea');
expect(commit.mock.calls).toEqual([['SET_WIDGET_COLOR', '#eaeaea']]);
});
});
});