summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js')
-rw-r--r--spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js b/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js
index 73fa4b7b08f..52e2393bf05 100644
--- a/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js
+++ b/spec/frontend/vue_merge_request_widget/components/artifacts_list_app_spec.js
@@ -5,6 +5,7 @@ import Vue, { nextTick } from 'vue';
import Vuex from 'vuex';
import { TEST_HOST as FAKE_ENDPOINT } from 'helpers/test_constants';
import axios from '~/lib/utils/axios_utils';
+import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status';
import ArtifactsListApp from '~/vue_merge_request_widget/components/artifacts_list_app.vue';
import { getStoreConfig } from '~/vue_merge_request_widget/stores/artifacts_list';
import { artifacts } from '../mock_data';
@@ -78,10 +79,10 @@ describe('Merge Requests Artifacts list app', () => {
describe('with results', () => {
beforeEach(() => {
createComponent();
- mock.onGet(FAKE_ENDPOINT).reply(200, artifacts, {});
+ mock.onGet(FAKE_ENDPOINT).reply(HTTP_STATUS_OK, artifacts, {});
store.dispatch('receiveArtifactsSuccess', {
data: artifacts,
- status: 200,
+ status: HTTP_STATUS_OK,
});
return nextTick();
});
@@ -109,7 +110,7 @@ describe('Merge Requests Artifacts list app', () => {
describe('with error', () => {
beforeEach(() => {
createComponent();
- mock.onGet(FAKE_ENDPOINT).reply(500, {}, {});
+ mock.onGet(FAKE_ENDPOINT).reply(HTTP_STATUS_INTERNAL_SERVER_ERROR, {}, {});
store.dispatch('receiveArtifactsError');
return nextTick();
});