summaryrefslogtreecommitdiff
path: root/spec/frontend/jira_connect/subscriptions/store/mutations_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/jira_connect/subscriptions/store/mutations_spec.js')
-rw-r--r--spec/frontend/jira_connect/subscriptions/store/mutations_spec.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/frontend/jira_connect/subscriptions/store/mutations_spec.js b/spec/frontend/jira_connect/subscriptions/store/mutations_spec.js
new file mode 100644
index 00000000000..84a33dbf0b5
--- /dev/null
+++ b/spec/frontend/jira_connect/subscriptions/store/mutations_spec.js
@@ -0,0 +1,28 @@
+import mutations from '~/jira_connect/subscriptions/store/mutations';
+import state from '~/jira_connect/subscriptions/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',
+ });
+ });
+ });
+});