diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/frontend/incidents_settings/components/incidents_settings_service_spec.js | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/frontend/incidents_settings/components/incidents_settings_service_spec.js')
-rw-r--r-- | spec/frontend/incidents_settings/components/incidents_settings_service_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/frontend/incidents_settings/components/incidents_settings_service_spec.js b/spec/frontend/incidents_settings/components/incidents_settings_service_spec.js index 08c407cc4b4..1d1b285c1b6 100644 --- a/spec/frontend/incidents_settings/components/incidents_settings_service_spec.js +++ b/spec/frontend/incidents_settings/components/incidents_settings_service_spec.js @@ -3,7 +3,7 @@ import { createAlert } from '~/flash'; import { ERROR_MSG } from '~/incidents_settings/constants'; import IncidentsSettingsService from '~/incidents_settings/incidents_settings_service'; import axios from '~/lib/utils/axios_utils'; -import httpStatusCodes from '~/lib/utils/http_status'; +import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { refreshCurrentPage } from '~/lib/utils/url_utility'; jest.mock('~/flash'); @@ -26,7 +26,7 @@ describe('IncidentsSettingsService', () => { describe('updateSettings', () => { it('should refresh the page on successful update', () => { - mock.onPatch().reply(httpStatusCodes.OK); + mock.onPatch().reply(HTTP_STATUS_OK); return service.updateSettings({}).then(() => { expect(refreshCurrentPage).toHaveBeenCalled(); @@ -34,7 +34,7 @@ describe('IncidentsSettingsService', () => { }); it('should display a flash message on update error', () => { - mock.onPatch().reply(httpStatusCodes.BAD_REQUEST); + mock.onPatch().reply(HTTP_STATUS_BAD_REQUEST); return service.updateSettings({}).then(() => { expect(createAlert).toHaveBeenCalledWith({ @@ -47,7 +47,7 @@ describe('IncidentsSettingsService', () => { describe('resetWebhookUrl', () => { it('should make a call for webhook update', () => { jest.spyOn(axios, 'post'); - mock.onPost().reply(httpStatusCodes.OK); + mock.onPost().reply(HTTP_STATUS_OK); return service.resetWebhookUrl().then(() => { expect(axios.post).toHaveBeenCalledWith(webhookUpdateEndpoint); |