debian-mirror-gitlab/spec/frontend/jira_connect/subscriptions/store/mutations_spec.js

29 lines
677 B
JavaScript
Raw Normal View History

2021-10-27 15:23:28 +05:30
import mutations from '~/jira_connect/subscriptions/store/mutations';
import state from '~/jira_connect/subscriptions/store/state';
2021-03-08 18:12:59 +05:30
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
});
});
});