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

32 lines
868 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', () => {
2021-03-08 18:12:59 +05:30
it('works', (done) => {
2019-02-15 15:39:39 +05:30
const data = { id: 7 };
testAction(actions.open, data, {}, [{ type: types.OPEN, payload: data }], [], done);
});
});
describe('close', () => {
2021-03-08 18:12:59 +05:30
it('works', (done) => {
2019-02-15 15:39:39 +05:30
testAction(actions.close, null, {}, [{ type: types.CLOSE }], [], done);
});
});
describe('show', () => {
2021-03-08 18:12:59 +05:30
it('works', (done) => {
2019-02-15 15:39:39 +05:30
testAction(actions.show, null, {}, [{ type: types.SHOW }], [], done);
});
});
describe('hide', () => {
2021-03-08 18:12:59 +05:30
it('works', (done) => {
2019-02-15 15:39:39 +05:30
testAction(actions.hide, null, {}, [{ type: types.HIDE }], [], done);
});
});
});