summaryrefslogtreecommitdiff
path: root/spec/frontend/monitoring
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 21:09:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 21:09:50 +0000
commit76358aee81a471a5e71eaf3e8c2d91b7c9a0a5a9 (patch)
treedf9ba3dcc09eb404de31e0d79cb8f0b77812e655 /spec/frontend/monitoring
parent80e9fdc9682cfbcfb9202a2733605a6a6bd23f05 (diff)
downloadgitlab-ce-76358aee81a471a5e71eaf3e8c2d91b7c9a0a5a9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/monitoring')
-rw-r--r--spec/frontend/monitoring/store/actions_spec.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/frontend/monitoring/store/actions_spec.js b/spec/frontend/monitoring/store/actions_spec.js
index 7c559aed2c5..b37c10791bf 100644
--- a/spec/frontend/monitoring/store/actions_spec.js
+++ b/spec/frontend/monitoring/store/actions_spec.js
@@ -6,6 +6,7 @@ import statusCodes from '~/lib/utils/http_status';
import * as commonUtils from '~/lib/utils/common_utils';
import createFlash from '~/flash';
import { defaultTimeRange } from '~/vue_shared/constants';
+import { ENVIRONMENT_AVAILABLE_STATE } from '~/monitoring/constants';
import store from '~/monitoring/stores';
import * as types from '~/monitoring/stores/mutation_types';
@@ -157,17 +158,21 @@ describe('Monitoring store actions', () => {
variables: {
projectPath: state.projectPath,
search: searchTerm,
+ states: [ENVIRONMENT_AVAILABLE_STATE],
},
};
state.environmentsSearchTerm = searchTerm;
- mockMutate.mockReturnValue(Promise.resolve());
+ mockMutate.mockResolvedValue({});
return testAction(
fetchEnvironmentsData,
null,
state,
[],
- [{ type: 'requestEnvironmentsData' }, { type: 'receiveEnvironmentsDataFailure' }],
+ [
+ { type: 'requestEnvironmentsData' },
+ { type: 'receiveEnvironmentsDataSuccess', payload: [] },
+ ],
() => {
expect(mockMutate).toHaveBeenCalledWith(mutationVariables);
},