Welcome to mirror list, hosted at ThFree Co, Russian Federation.

actions_spec.js « modal « modules « vuex_shared « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 928ed7d0d5f34b004e0335140a8d8723adff10bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import testAction from 'helpers/vuex_action_helper';
import * as actions from '~/vuex_shared/modules/modal/actions';
import * as types from '~/vuex_shared/modules/modal/mutation_types';

describe('Vuex ModalModule actions', () => {
  describe('open', () => {
    it('works', () => {
      const data = { id: 7 };

      return testAction(actions.open, data, {}, [{ type: types.OPEN, payload: data }], []);
    });
  });

  describe('close', () => {
    it('works', () => {
      return testAction(actions.close, null, {}, [{ type: types.CLOSE }], []);
    });
  });

  describe('show', () => {
    it('works', () => {
      return testAction(actions.show, null, {}, [{ type: types.SHOW }], []);
    });
  });

  describe('hide', () => {
    it('works', () => {
      return testAction(actions.hide, null, {}, [{ type: types.HIDE }], []);
    });
  });
});