diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-27 00:11:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-27 00:11:52 +0300 |
commit | e04b8c1e60649802ae4249dae7fa7aaf3f0a83c7 (patch) | |
tree | dc5607b353067e079443b9478572e4a394bfe011 /spec/frontend/frequent_items | |
parent | cea01cb81787f0d2c119b287a5833f2e267324bc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/frequent_items')
-rw-r--r-- | spec/frontend/frequent_items/components/app_spec.js | 5 | ||||
-rw-r--r-- | spec/frontend/frequent_items/store/actions_spec.js | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/spec/frontend/frequent_items/components/app_spec.js b/spec/frontend/frequent_items/components/app_spec.js index b1e87aca63d..77ffe37546e 100644 --- a/spec/frontend/frequent_items/components/app_spec.js +++ b/spec/frontend/frequent_items/components/app_spec.js @@ -12,6 +12,7 @@ import eventHub from '~/frequent_items/event_hub'; import { createStore } from '~/frequent_items/store'; import { getTopFrequentItems } from '~/frequent_items/utils'; import axios from '~/lib/utils/axios_utils'; +import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { currentSession, mockFrequentProjects, mockSearchedProjects } from '../mock_data'; Vue.use(Vuex); @@ -115,7 +116,9 @@ describe('Frequent Items App Component', () => { }); it('should render searched projects list', async () => { - mock.onGet(/\/api\/v4\/projects.json(.*)$/).replyOnce(200, mockSearchedProjects.data); + mock + .onGet(/\/api\/v4\/projects.json(.*)$/) + .replyOnce(HTTP_STATUS_OK, mockSearchedProjects.data); setSearch('gitlab'); await nextTick(); diff --git a/spec/frontend/frequent_items/store/actions_spec.js b/spec/frontend/frequent_items/store/actions_spec.js index 15905d71a21..2feb488da2c 100644 --- a/spec/frontend/frequent_items/store/actions_spec.js +++ b/spec/frontend/frequent_items/store/actions_spec.js @@ -5,7 +5,7 @@ import * as types from '~/frequent_items/store/mutation_types'; import state from '~/frequent_items/store/state'; import AccessorUtilities from '~/lib/utils/accessor'; import axios from '~/lib/utils/axios_utils'; -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 { useLocalStorageSpy } from 'helpers/local_storage_helper'; import { mockNamespace, @@ -174,7 +174,9 @@ describe('Frequent Items Dropdown Store Actions', () => { }); it('should dispatch `receiveSearchedItemsSuccess`', () => { - mock.onGet(/\/api\/v4\/projects.json(.*)$/).replyOnce(200, mockSearchedProjects, {}); + mock + .onGet(/\/api\/v4\/projects.json(.*)$/) + .replyOnce(HTTP_STATUS_OK, mockSearchedProjects, {}); return testAction( actions.fetchSearchedItems, |