summaryrefslogtreecommitdiff
path: root/spec/frontend/snippets/components/snippet_blob_edit_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/snippets/components/snippet_blob_edit_spec.js')
-rw-r--r--spec/frontend/snippets/components/snippet_blob_edit_spec.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/frontend/snippets/components/snippet_blob_edit_spec.js b/spec/frontend/snippets/components/snippet_blob_edit_spec.js
index 33b8e2be969..82c4a37ccc9 100644
--- a/spec/frontend/snippets/components/snippet_blob_edit_spec.js
+++ b/spec/frontend/snippets/components/snippet_blob_edit_spec.js
@@ -6,6 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import BlobHeaderEdit from '~/blob/components/blob_edit_header.vue';
import { createAlert } from '~/flash';
import axios from '~/lib/utils/axios_utils';
+import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status';
import { joinPaths } from '~/lib/utils/url_utility';
import SnippetBlobEdit from '~/snippets/components/snippet_blob_edit.vue';
import SourceEditor from '~/vue_shared/components/source_editor.vue';
@@ -57,7 +58,7 @@ describe('Snippet Blob Edit component', () => {
beforeEach(() => {
axiosMock = new AxiosMockAdapter(axios);
- axiosMock.onGet(TEST_FULL_PATH).reply(200, TEST_CONTENT);
+ axiosMock.onGet(TEST_FULL_PATH).reply(HTTP_STATUS_OK, TEST_CONTENT);
});
afterEach(() => {
@@ -103,7 +104,7 @@ describe('Snippet Blob Edit component', () => {
describe('with unloaded blob and JSON content', () => {
beforeEach(() => {
- axiosMock.onGet(TEST_FULL_PATH).reply(200, TEST_JSON_CONTENT);
+ axiosMock.onGet(TEST_FULL_PATH).reply(HTTP_STATUS_OK, TEST_JSON_CONTENT);
createComponent();
});
@@ -118,7 +119,7 @@ describe('Snippet Blob Edit component', () => {
describe('with error', () => {
beforeEach(() => {
axiosMock.reset();
- axiosMock.onGet(TEST_FULL_PATH).replyOnce(500);
+ axiosMock.onGet(TEST_FULL_PATH).replyOnce(HTTP_STATUS_INTERNAL_SERVER_ERROR);
createComponent();
});