2021-11-22 09:35:29 +00:00
|
|
|
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', () => {
|
2022-01-12 10:55:27 +00:00
|
|
|
actions.setWidgetColor({ commit }, '#eaeaea');
|
|
|
|
expect(commit.mock.calls).toEqual([['SET_WIDGET_COLOR', '#eaeaea']]);
|
2021-11-22 09:35:29 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|