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:
Diffstat (limited to 'spec/frontend/error_tracking/store/actions_spec.js')
-rw-r--r--spec/frontend/error_tracking/store/actions_spec.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/frontend/error_tracking/store/actions_spec.js b/spec/frontend/error_tracking/store/actions_spec.js
index 8f085282f80..3ec43010d80 100644
--- a/spec/frontend/error_tracking/store/actions_spec.js
+++ b/spec/frontend/error_tracking/store/actions_spec.js
@@ -4,6 +4,7 @@ import * as actions from '~/error_tracking/store/actions';
import * as types from '~/error_tracking/store/mutation_types';
import { createAlert } from '~/flash';
import axios from '~/lib/utils/axios_utils';
+import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_OK } from '~/lib/utils/http_status';
import { visitUrl } from '~/lib/utils/url_utility';
jest.mock('~/flash.js');
@@ -29,7 +30,7 @@ describe('Sentry common store actions', () => {
describe('updateStatus', () => {
it('should handle successful status update', async () => {
- mock.onPut().reply(200, {});
+ mock.onPut().reply(HTTP_STATUS_OK, {});
await testAction(
actions.updateStatus,
params,
@@ -46,7 +47,7 @@ describe('Sentry common store actions', () => {
});
it('should handle unsuccessful status update', async () => {
- mock.onPut().reply(400, {});
+ mock.onPut().reply(HTTP_STATUS_BAD_REQUEST, {});
await testAction(actions.updateStatus, params, {}, [], []);
expect(visitUrl).not.toHaveBeenCalled();
expect(createAlert).toHaveBeenCalledTimes(1);