summaryrefslogtreecommitdiff
path: root/spec/frontend/feature_highlight/feature_highlight_helper_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/feature_highlight/feature_highlight_helper_spec.js')
-rw-r--r--spec/frontend/feature_highlight/feature_highlight_helper_spec.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/frontend/feature_highlight/feature_highlight_helper_spec.js b/spec/frontend/feature_highlight/feature_highlight_helper_spec.js
index d82081041d9..4d5cb26810e 100644
--- a/spec/frontend/feature_highlight/feature_highlight_helper_spec.js
+++ b/spec/frontend/feature_highlight/feature_highlight_helper_spec.js
@@ -2,7 +2,7 @@ import MockAdapter from 'axios-mock-adapter';
import { dismiss } from '~/feature_highlight/feature_highlight_helper';
import { createAlert } from '~/flash';
import axios from '~/lib/utils/axios_utils';
-import httpStatusCodes, { HTTP_STATUS_CREATED } from '~/lib/utils/http_status';
+import { HTTP_STATUS_CREATED, HTTP_STATUS_INTERNAL_SERVER_ERROR } from '~/lib/utils/http_status';
jest.mock('~/flash');
@@ -11,7 +11,6 @@ describe('feature highlight helper', () => {
let mockAxios;
const endpoint = '/-/callouts/dismiss';
const highlightId = '123';
- const { INTERNAL_SERVER_ERROR } = httpStatusCodes;
beforeEach(() => {
mockAxios = new MockAdapter(axios);
@@ -28,7 +27,9 @@ describe('feature highlight helper', () => {
});
it('triggers flash when dismiss request fails', async () => {
- mockAxios.onPost(endpoint, { feature_name: highlightId }).replyOnce(INTERNAL_SERVER_ERROR);
+ mockAxios
+ .onPost(endpoint, { feature_name: highlightId })
+ .replyOnce(HTTP_STATUS_INTERNAL_SERVER_ERROR);
await dismiss(endpoint, highlightId);