summaryrefslogtreecommitdiff
path: root/spec/frontend/api_spec.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-04 12:09:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-04 12:09:14 +0000
commit8a9cbfa9c56792d8e338c289eb803fb0ebde2083 (patch)
treefa5ff83fa919ae9a1c37cd8146b78a4a04c9ab7c /spec/frontend/api_spec.js
parentfc7ce8aea5b2eca1aaf510667c79b3e7e72f2f3f (diff)
downloadgitlab-ce-8a9cbfa9c56792d8e338c289eb803fb0ebde2083.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/api_spec.js')
-rw-r--r--spec/frontend/api_spec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/api_spec.js b/spec/frontend/api_spec.js
index 400f36f10a9..7fdd0d7d6db 100644
--- a/spec/frontend/api_spec.js
+++ b/spec/frontend/api_spec.js
@@ -118,6 +118,24 @@ describe('Api', () => {
});
});
+ describe('container registry', () => {
+ describe('containerRegistryDetails', () => {
+ it('fetch container registry details', async () => {
+ const expectedUrl = `foo`;
+ const apiResponse = {};
+
+ jest.spyOn(axios, 'get');
+ jest.spyOn(Api, 'buildUrl').mockReturnValueOnce(expectedUrl);
+ mock.onGet(expectedUrl).replyOnce(httpStatus.OK, apiResponse);
+
+ const { data } = await Api.containerRegistryDetails(1);
+
+ expect(data).toEqual(apiResponse);
+ expect(axios.get).toHaveBeenCalledWith(expectedUrl, {});
+ });
+ });
+ });
+
describe('group', () => {
it('fetches a group', done => {
const groupId = '123456';