diff options
Diffstat (limited to 'spec/frontend/environments/new_environment_spec.js')
-rw-r--r-- | spec/frontend/environments/new_environment_spec.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/frontend/environments/new_environment_spec.js b/spec/frontend/environments/new_environment_spec.js index 5dd77759391..016d9571094 100644 --- a/spec/frontend/environments/new_environment_spec.js +++ b/spec/frontend/environments/new_environment_spec.js @@ -5,6 +5,7 @@ import waitForPromises from 'helpers/wait_for_promises'; import NewEnvironment from '~/environments/components/new_environment.vue'; import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; +import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { visitUrl } from '~/lib/utils/url_utility'; jest.mock('~/lib/utils/url_utility'); @@ -79,7 +80,7 @@ describe('~/environments/components/new.vue', () => { expect(showsLoading()).toBe(false); - await submitForm(expected, [200, { path: '/test' }]); + await submitForm(expected, [HTTP_STATUS_OK, { path: '/test' }]); expect(showsLoading()).toBe(true); }); @@ -87,7 +88,7 @@ describe('~/environments/components/new.vue', () => { it('submits the new environment on submit', async () => { const expected = { name: 'test', url: 'https://google.ca' }; - await submitForm(expected, [200, { path: '/test' }]); + await submitForm(expected, [HTTP_STATUS_OK, { path: '/test' }]); expect(visitUrl).toHaveBeenCalledWith('/test'); }); |