debian-mirror-gitlab/spec/frontend/vuex_shared/modules/modal/actions_spec.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
856 B
JavaScript
Raw Normal View History

2020-06-23 00:09:42 +05:30
import testAction from 'helpers/vuex_action_helper';
2019-02-15 15:39:39 +05:30
import * as actions from '~/vuex_shared/modules/modal/actions';
2021-03-11 19:13:27 +05:30
import * as types from '~/vuex_shared/modules/modal/mutation_types';
2019-02-15 15:39:39 +05:30
describe('Vuex ModalModule actions', () => {
describe('open', () => {
2022-06-21 17:19:12 +05:30
it('works', () => {
2019-02-15 15:39:39 +05:30
const data = { id: 7 };
2022-06-21 17:19:12 +05:30
return testAction(actions.open, data, {}, [{ type: types.OPEN, payload: data }], []);
2019-02-15 15:39:39 +05:30
});
});
describe('close', () => {
2022-06-21 17:19:12 +05:30
it('works', () => {
return testAction(actions.close, null, {}, [{ type: types.CLOSE }], []);
2019-02-15 15:39:39 +05:30
});
});
describe('show', () => {
2022-06-21 17:19:12 +05:30
it('works', () => {
return testAction(actions.show, null, {}, [{ type: types.SHOW }], []);
2019-02-15 15:39:39 +05:30
});
});
describe('hide', () => {
2022-06-21 17:19:12 +05:30
it('works', () => {
return testAction(actions.hide, null, {}, [{ type: types.HIDE }], []);
2019-02-15 15:39:39 +05:30
});
});
});