From 5ff5047fdc2c614f347de5c388424b50a5460165 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 23 Feb 2021 15:10:47 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/boards/stores/actions_spec.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'spec/frontend/boards/stores/actions_spec.js') diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js index 80d98c5eb6b..c22942774e8 100644 --- a/spec/frontend/boards/stores/actions_spec.js +++ b/spec/frontend/boards/stores/actions_spec.js @@ -327,11 +327,15 @@ describe('fetchLabels', () => { }; jest.spyOn(gqlClient, 'query').mockResolvedValue(queryResponse); - await testAction({ - action: actions.fetchLabels, - state: { boardType: 'group' }, - expectedMutations: [{ type: types.RECEIVE_LABELS_SUCCESS, payload: labels }], - }); + const commit = jest.fn(); + const getters = { + shouldUseGraphQL: () => true, + }; + const state = { boardType: 'group' }; + + await actions.fetchLabels({ getters, state, commit }); + + expect(commit).toHaveBeenCalledWith(types.RECEIVE_LABELS_SUCCESS, labels); }); }); -- cgit v1.2.3