summaryrefslogtreecommitdiff
path: root/spec/frontend/vue_shared/components/entity_select
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-20 09:07:18 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-20 09:07:18 +0000
commit11b9d80bd76531de59013e773957b46d014b82af (patch)
tree56bdd016df9b196a797b0c18d5cfc30960d5c385 /spec/frontend/vue_shared/components/entity_select
parente49f1ae46a164511ba79a08fea137ced2c357d6b (diff)
downloadgitlab-ce-11b9d80bd76531de59013e773957b46d014b82af.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components/entity_select')
-rw-r--r--spec/frontend/vue_shared/components/entity_select/group_select_spec.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/frontend/vue_shared/components/entity_select/group_select_spec.js b/spec/frontend/vue_shared/components/entity_select/group_select_spec.js
index bcf3aee5a4f..2c94b34971d 100644
--- a/spec/frontend/vue_shared/components/entity_select/group_select_spec.js
+++ b/spec/frontend/vue_shared/components/entity_select/group_select_spec.js
@@ -2,6 +2,7 @@ import { GlCollapsibleListbox } from '@gitlab/ui';
import MockAdapter from 'axios-mock-adapter';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import axios from '~/lib/utils/axios_utils';
+import { HTTP_STATUS_INTERNAL_SERVER_ERROR } from '~/lib/utils/http_status';
import GroupSelect from '~/vue_shared/components/entity_select/group_select.vue';
import EntitySelect from '~/vue_shared/components/entity_select/entity_select.vue';
import {
@@ -107,7 +108,7 @@ describe('GroupSelect', () => {
mock
.onGet('/api/undefined/groups.json')
.reply(200, [{ full_name: 'notTheSelectedGroup', id: '2' }]);
- mock.onGet(groupEndpoint).reply(500);
+ mock.onGet(groupEndpoint).reply(HTTP_STATUS_INTERNAL_SERVER_ERROR);
createComponent({ props: { initialSelection: groupMock.id } });
expect(findAlert().exists()).toBe(false);
@@ -121,7 +122,7 @@ describe('GroupSelect', () => {
});
it('shows an error when fetching groups fails', async () => {
- mock.onGet('/api/undefined/groups.json').reply(500);
+ mock.onGet('/api/undefined/groups.json').reply(HTTP_STATUS_INTERNAL_SERVER_ERROR);
createComponent();
openListbox();
expect(findAlert().exists()).toBe(false);