2021-03-08 18:12:59 +05:30
|
|
|
import mutations from '~/jira_connect/store/mutations';
|
|
|
|
import state from '~/jira_connect/store/state';
|
|
|
|
|
|
|
|
describe('JiraConnect store mutations', () => {
|
|
|
|
let localState;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
localState = state();
|
|
|
|
});
|
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
describe('SET_ALERT', () => {
|
|
|
|
it('sets alert state', () => {
|
|
|
|
mutations.SET_ALERT(localState, {
|
|
|
|
message: 'test error',
|
|
|
|
variant: 'danger',
|
|
|
|
title: 'test title',
|
|
|
|
linkUrl: 'linkUrl',
|
|
|
|
});
|
2021-03-08 18:12:59 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
expect(localState.alert).toMatchObject({
|
|
|
|
message: 'test error',
|
|
|
|
variant: 'danger',
|
|
|
|
title: 'test title',
|
|
|
|
linkUrl: 'linkUrl',
|
|
|
|
});
|
2021-03-08 18:12:59 +05:30
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|