chore: Move referrerHost to appConfig store (#3433)

This commit is contained in:
Pranav Raj S
2021-11-22 15:05:29 +05:30
committed by GitHub
parent 1be7c2d72c
commit 1a8b8f0900
11 changed files with 138 additions and 81 deletions

View File

@@ -0,0 +1,22 @@
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' }],
]);
});
});
});