23 lines
641 B
JavaScript
23 lines
641 B
JavaScript
|
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 }, { widgetColor: '#eaeaea' });
|
||
|
expect(commit.mock.calls).toEqual([
|
||
|
['SET_WIDGET_COLOR', { widgetColor: '#eaeaea' }],
|
||
|
]);
|
||
|
});
|
||
|
});
|
||
|
});
|