summaryrefslogtreecommitdiff
path: root/spec/frontend/vuex_shared/modules/modal/actions_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/vuex_shared/modules/modal/actions_spec.js')
-rw-r--r--spec/frontend/vuex_shared/modules/modal/actions_spec.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/frontend/vuex_shared/modules/modal/actions_spec.js b/spec/frontend/vuex_shared/modules/modal/actions_spec.js
new file mode 100644
index 00000000000..353dbcb522f
--- /dev/null
+++ b/spec/frontend/vuex_shared/modules/modal/actions_spec.js
@@ -0,0 +1,31 @@
+import testAction from 'helpers/vuex_action_helper';
+import * as types from '~/vuex_shared/modules/modal/mutation_types';
+import * as actions from '~/vuex_shared/modules/modal/actions';
+
+describe('Vuex ModalModule actions', () => {
+ describe('open', () => {
+ it('works', done => {
+ const data = { id: 7 };
+
+ testAction(actions.open, data, {}, [{ type: types.OPEN, payload: data }], [], done);
+ });
+ });
+
+ describe('close', () => {
+ it('works', done => {
+ testAction(actions.close, null, {}, [{ type: types.CLOSE }], [], done);
+ });
+ });
+
+ describe('show', () => {
+ it('works', done => {
+ testAction(actions.show, null, {}, [{ type: types.SHOW }], [], done);
+ });
+ });
+
+ describe('hide', () => {
+ it('works', done => {
+ testAction(actions.hide, null, {}, [{ type: types.HIDE }], [], done);
+ });
+ });
+});