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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 17:22:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 17:22:11 +0300
commit0c872e02b2c822e3397515ec324051ff540f0cd5 (patch)
treece2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/frontend/monitoring/store/actions_spec.js
parentf7e05a6853b12f02911494c4b3fe53d9540d74fc (diff)
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/frontend/monitoring/store/actions_spec.js')
-rw-r--r--spec/frontend/monitoring/store/actions_spec.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/frontend/monitoring/store/actions_spec.js b/spec/frontend/monitoring/store/actions_spec.js
index ca66768c3cc..93af6526c67 100644
--- a/spec/frontend/monitoring/store/actions_spec.js
+++ b/spec/frontend/monitoring/store/actions_spec.js
@@ -4,7 +4,10 @@ import testAction from 'helpers/vuex_action_helper';
import { createAlert } from '~/flash';
import axios from '~/lib/utils/axios_utils';
import * as commonUtils from '~/lib/utils/common_utils';
-import statusCodes from '~/lib/utils/http_status';
+import statusCodes, {
+ HTTP_STATUS_CREATED,
+ HTTP_STATUS_UNPROCESSABLE_ENTITY,
+} from '~/lib/utils/http_status';
import { ENVIRONMENT_AVAILABLE_STATE } from '~/monitoring/constants';
import getAnnotations from '~/monitoring/queries/get_annotations.query.graphql';
@@ -944,7 +947,7 @@ describe('Monitoring store actions', () => {
});
it('Succesful POST request resolves', async () => {
- mock.onPost(state.dashboardsEndpoint).reply(statusCodes.CREATED, {
+ mock.onPost(state.dashboardsEndpoint).reply(HTTP_STATUS_CREATED, {
dashboard: dashboardGitResponse[1],
});
@@ -969,7 +972,7 @@ describe('Monitoring store actions', () => {
commit_message: 'A new commit message',
});
- mock.onPost(state.dashboardsEndpoint).reply(statusCodes.CREATED, {
+ mock.onPost(state.dashboardsEndpoint).reply(HTTP_STATUS_CREATED, {
dashboard: mockCreatedDashboard,
});
@@ -1133,7 +1136,7 @@ describe('Monitoring store actions', () => {
mock
.onPost(panelPreviewEndpoint, { panel_yaml: mockYmlContent })
- .reply(statusCodes.UNPROCESSABLE_ENTITY, {
+ .reply(HTTP_STATUS_UNPROCESSABLE_ENTITY, {
message: mockErrorMsg,
});