Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-16 06:08:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-16 06:08:22 +0300
commit8e211be724524fef7d23ca0c8d5d6a5bd261bf06 (patch)
treefd2d412fa868e06f1c97c2c9e29ffe0f7478918e /spec/frontend/api
parentde6848e2753ab5834699bf0c9225f17ba0bd4b3d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/api')
-rw-r--r--spec/frontend/api/groups_api_spec.js4
-rw-r--r--spec/frontend/api/harbor_registry_spec.js8
-rw-r--r--spec/frontend/api/packages_api_spec.js4
-rw-r--r--spec/frontend/api/tags_api_spec.js4
4 files changed, 10 insertions, 10 deletions
diff --git a/spec/frontend/api/groups_api_spec.js b/spec/frontend/api/groups_api_spec.js
index 9de588a02aa..c354d8a9416 100644
--- a/spec/frontend/api/groups_api_spec.js
+++ b/spec/frontend/api/groups_api_spec.js
@@ -1,6 +1,6 @@
import MockAdapter from 'axios-mock-adapter';
import getGroupTransferLocationsResponse from 'test_fixtures/api/groups/transfer_locations.json';
-import httpStatus from '~/lib/utils/http_status';
+import { HTTP_STATUS_OK } from '~/lib/utils/http_status';
import axios from '~/lib/utils/axios_utils';
import { DEFAULT_PER_PAGE } from '~/api';
import { updateGroup, getGroupTransferLocations } from '~/api/groups_api';
@@ -35,7 +35,7 @@ describe('GroupsApi', () => {
beforeEach(() => {
mock.onPut(expectedUrl).reply(({ data }) => {
- return [httpStatus.OK, { id: mockGroupId, ...JSON.parse(data) }];
+ return [HTTP_STATUS_OK, { id: mockGroupId, ...JSON.parse(data) }];
});
});
diff --git a/spec/frontend/api/harbor_registry_spec.js b/spec/frontend/api/harbor_registry_spec.js
index 8a4c377ebd1..db4b189835e 100644
--- a/spec/frontend/api/harbor_registry_spec.js
+++ b/spec/frontend/api/harbor_registry_spec.js
@@ -1,7 +1,7 @@
import MockAdapter from 'axios-mock-adapter';
import * as harborRegistryApi from '~/api/harbor_registry';
import axios from '~/lib/utils/axios_utils';
-import httpStatus from '~/lib/utils/http_status';
+import { HTTP_STATUS_OK } from '~/lib/utils/http_status';
describe('~/api/harbor_registry', () => {
let mock;
@@ -37,7 +37,7 @@ describe('~/api/harbor_registry', () => {
location: 'http://demo.harbor.com/harbor/projects/2/repositories/image-1',
},
];
- mock.onGet(expectedUrl).reply(httpStatus.OK, expectResponse);
+ mock.onGet(expectedUrl).reply(HTTP_STATUS_OK, expectResponse);
return harborRegistryApi.getHarborRepositoriesList(expectedParams).then(({ data }) => {
expect(data).toEqual(expectResponse);
@@ -66,7 +66,7 @@ describe('~/api/harbor_registry', () => {
tags: ['v2', 'v1', 'latest'],
},
];
- mock.onGet(expectedUrl).reply(httpStatus.OK, expectResponse);
+ mock.onGet(expectedUrl).reply(HTTP_STATUS_OK, expectResponse);
return harborRegistryApi.getHarborArtifacts(expectedParams).then(({ data }) => {
expect(data).toEqual(expectResponse);
@@ -97,7 +97,7 @@ describe('~/api/harbor_registry', () => {
immutable: false,
},
];
- mock.onGet(expectedUrl).reply(httpStatus.OK, expectResponse);
+ mock.onGet(expectedUrl).reply(HTTP_STATUS_OK, expectResponse);
return harborRegistryApi.getHarborTags(expectedParams).then(({ data }) => {
expect(data).toEqual(expectResponse);
diff --git a/spec/frontend/api/packages_api_spec.js b/spec/frontend/api/packages_api_spec.js
index d55d2036dcf..5f517bcf358 100644
--- a/spec/frontend/api/packages_api_spec.js
+++ b/spec/frontend/api/packages_api_spec.js
@@ -1,7 +1,7 @@
import MockAdapter from 'axios-mock-adapter';
import { publishPackage } from '~/api/packages_api';
import axios from '~/lib/utils/axios_utils';
-import httpStatus from '~/lib/utils/http_status';
+import { HTTP_STATUS_OK } from '~/lib/utils/http_status';
describe('Api', () => {
const dummyApiVersion = 'v3000';
@@ -35,7 +35,7 @@ describe('Api', () => {
const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${projectPath}/packages/generic/${name}/${packageVersion}/${name}`;
jest.spyOn(axios, 'put');
- mock.onPut(expectedUrl).replyOnce(httpStatus.OK, apiResponse);
+ mock.onPut(expectedUrl).replyOnce(HTTP_STATUS_OK, apiResponse);
return publishPackage(
{
diff --git a/spec/frontend/api/tags_api_spec.js b/spec/frontend/api/tags_api_spec.js
index a7436bf6a50..af3533f52b7 100644
--- a/spec/frontend/api/tags_api_spec.js
+++ b/spec/frontend/api/tags_api_spec.js
@@ -1,7 +1,7 @@
import MockAdapter from 'axios-mock-adapter';
import * as tagsApi from '~/api/tags_api';
import axios from '~/lib/utils/axios_utils';
-import httpStatus from '~/lib/utils/http_status';
+import { HTTP_STATUS_OK } from '~/lib/utils/http_status';
describe('~/api/tags_api.js', () => {
let mock;
@@ -25,7 +25,7 @@ describe('~/api/tags_api.js', () => {
it('fetches a tag of a given tag name of a particular project', () => {
const tagName = 'tag-name';
const expectedUrl = `/api/v7/projects/${projectId}/repository/tags/${tagName}`;
- mock.onGet(expectedUrl).reply(httpStatus.OK, {
+ mock.onGet(expectedUrl).reply(HTTP_STATUS_OK, {
name: tagName,
});