diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/frontend/boards/stores/actions_spec.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/frontend/boards/stores/actions_spec.js')
-rw-r--r-- | spec/frontend/boards/stores/actions_spec.js | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js index 0debca1310a..d539cba76ca 100644 --- a/spec/frontend/boards/stores/actions_spec.js +++ b/spec/frontend/boards/stores/actions_spec.js @@ -1,6 +1,7 @@ +import testAction from 'helpers/vuex_action_helper'; import actions from '~/boards/stores/actions'; import * as types from '~/boards/stores/mutation_types'; -import testAction from 'helpers/vuex_action_helper'; +import { inactiveId } from '~/boards/constants'; const expectNotImplemented = action => { it('is not implemented', () => { @@ -8,19 +9,36 @@ const expectNotImplemented = action => { }); }; -describe('setEndpoints', () => { - it('sets endpoints object', () => { - const mockEndpoints = { +describe('setInitialBoardData', () => { + it('sets data object', () => { + const mockData = { foo: 'bar', bar: 'baz', }; return testAction( - actions.setEndpoints, - mockEndpoints, + actions.setInitialBoardData, + mockData, {}, - [{ type: types.SET_ENDPOINTS, payload: mockEndpoints }], + [{ type: types.SET_INITIAL_BOARD_DATA, payload: mockData }], + [], + ); + }); +}); + +describe('setActiveId', () => { + it('should commit mutation SET_ACTIVE_ID', done => { + const state = { + activeId: inactiveId, + }; + + testAction( + actions.setActiveId, + 1, + state, + [{ type: types.SET_ACTIVE_ID, payload: 1 }], [], + done, ); }); }); |