diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-21 06:08:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-21 06:08:59 +0300 |
commit | e1e342d79bcc1f72829cc6d1642f5e7d76750e75 (patch) | |
tree | e9933b8528a4fca22c1421cfee42adefe8c6d8ee /spec/frontend/boards/stores/actions_spec.js | |
parent | 9f021745a60369298705393103f621ff73a2b286 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/stores/actions_spec.js')
-rw-r--r-- | spec/frontend/boards/stores/actions_spec.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js index e4209cd5e55..04b08b579f8 100644 --- a/spec/frontend/boards/stores/actions_spec.js +++ b/spec/frontend/boards/stores/actions_spec.js @@ -254,6 +254,27 @@ describe('createList', () => { }); }); +describe('fetchLabels', () => { + it('should commit mutation RECEIVE_LABELS_SUCCESS on success', async () => { + const queryResponse = { + data: { + group: { + labels: { + nodes: labels, + }, + }, + }, + }; + jest.spyOn(gqlClient, 'query').mockResolvedValue(queryResponse); + + await testAction({ + action: actions.fetchLabels, + state: { boardType: 'group' }, + expectedMutations: [{ type: types.RECEIVE_LABELS_SUCCESS, payload: labels }], + }); + }); +}); + describe('moveList', () => { it('should commit MOVE_LIST mutation and dispatch updateList action', (done) => { const initialBoardListsState = { |