diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-31 12:07:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-31 12:07:35 +0300 |
commit | aa88b9053d72f3f9b69ae5365b77595dcae5c0c3 (patch) | |
tree | aa697939b0ea8a5333d13e92d0bc961bfff6ada7 /spec/frontend/projects | |
parent | e6c495fe40320eb01bf8c4fb132c9f22449ae9d2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/projects')
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/frontend/projects/commits/store/actions_spec.js b/spec/frontend/projects/commits/store/actions_spec.js index 64eba056c6f..bae9c48fc1e 100644 --- a/spec/frontend/projects/commits/store/actions_spec.js +++ b/spec/frontend/projects/commits/store/actions_spec.js @@ -2,7 +2,7 @@ import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import testAction from 'helpers/vuex_action_helper'; import { createAlert } from '~/flash'; -import { HTTP_STATUS_INTERNAL_SERVER_ERROR } from '~/lib/utils/http_status'; +import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import actions from '~/projects/commits/store/actions'; import * as types from '~/projects/commits/store/mutation_types'; import createState from '~/projects/commits/store/state'; @@ -52,7 +52,7 @@ describe('Project commits actions', () => { state.projectId = '8'; const data = [{ id: 1 }]; - mock.onGet(path).replyOnce(200, data); + mock.onGet(path).replyOnce(HTTP_STATUS_OK, data); testAction( actions.fetchAuthors, null, diff --git a/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js b/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js index 6152965398d..53763bd7d8f 100644 --- a/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js +++ b/spec/frontend/projects/compare/components/revision_dropdown_legacy_spec.js @@ -4,7 +4,7 @@ import AxiosMockAdapter from 'axios-mock-adapter'; import { nextTick } from 'vue'; import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; -import { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status'; +import { HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import RevisionDropdown from '~/projects/compare/components/revision_dropdown_legacy.vue'; const defaultProps = { @@ -51,7 +51,7 @@ describe('RevisionDropdown component', () => { const Branches = ['branch-1', 'branch-2']; const Tags = ['tag-1', 'tag-2', 'tag-3']; - axiosMock.onGet(defaultProps.refsProjectPath).replyOnce(200, { + axiosMock.onGet(defaultProps.refsProjectPath).replyOnce(HTTP_STATUS_OK, { Branches, Tags, }); @@ -65,7 +65,7 @@ describe('RevisionDropdown component', () => { }); it('sets branches and tags to be an empty array when no tags or branches are given', async () => { - axiosMock.onGet(defaultProps.refsProjectPath).replyOnce(200, { + axiosMock.onGet(defaultProps.refsProjectPath).replyOnce(HTTP_STATUS_OK, { Branches: undefined, Tags: undefined, }); diff --git a/spec/frontend/projects/compare/components/revision_dropdown_spec.js b/spec/frontend/projects/compare/components/revision_dropdown_spec.js index d1f8fe96b86..db4a1158996 100644 --- a/spec/frontend/projects/compare/components/revision_dropdown_spec.js +++ b/spec/frontend/projects/compare/components/revision_dropdown_spec.js @@ -4,7 +4,7 @@ import AxiosMockAdapter from 'axios-mock-adapter'; import { nextTick } from 'vue'; import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; -import { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status'; +import { HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import RevisionDropdown from '~/projects/compare/components/revision_dropdown.vue'; import { revisionDropdownDefaultProps as defaultProps } from './mock_data'; @@ -50,7 +50,7 @@ describe('RevisionDropdown component', () => { const Branches = ['branch-1', 'branch-2']; const Tags = ['tag-1', 'tag-2', 'tag-3']; - axiosMock.onGet(defaultProps.refsProjectPath).replyOnce(200, { + axiosMock.onGet(defaultProps.refsProjectPath).replyOnce(HTTP_STATUS_OK, { Branches, Tags, }); |