debian-mirror-gitlab/spec/frontend/jira_connect/store/mutations_spec.js
2021-04-17 20:07:23 +05:30

28 lines
649 B
JavaScript

import mutations from '~/jira_connect/store/mutations';
import state from '~/jira_connect/store/state';
describe('JiraConnect store mutations', () => {
let localState;
beforeEach(() => {
localState = state();
});
describe('SET_ALERT', () => {
it('sets alert state', () => {
mutations.SET_ALERT(localState, {
message: 'test error',
variant: 'danger',
title: 'test title',
linkUrl: 'linkUrl',
});
expect(localState.alert).toMatchObject({
message: 'test error',
variant: 'danger',
title: 'test title',
linkUrl: 'linkUrl',
});
});
});
});