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>2020-06-11 12:08:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-11 12:08:16 +0300
commita64fb464b4081ec468da3fec97dfdede1fbd55e7 (patch)
tree124372fd54583716a964152ba68b2df80ff09140 /spec/frontend/api_spec.js
parent1b3eb6f388e2c376cc95adbd4babd8bad76eb4d6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/api_spec.js')
-rw-r--r--spec/frontend/api_spec.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/frontend/api_spec.js b/spec/frontend/api_spec.js
index d3659693405..c1a23d441b3 100644
--- a/spec/frontend/api_spec.js
+++ b/spec/frontend/api_spec.js
@@ -725,4 +725,26 @@ describe('Api', () => {
.catch(done.fail);
});
});
+
+ describe('tags', () => {
+ it('fetches all tags of a particular project', done => {
+ const query = 'dummy query';
+ const options = { unused: 'option' };
+ const projectId = 8;
+ const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${projectId}/repository/tags`;
+ mock.onGet(expectedUrl).reply(200, [
+ {
+ name: 'test',
+ },
+ ]);
+
+ Api.tags(projectId, query, options)
+ .then(({ data }) => {
+ expect(data.length).toBe(1);
+ expect(data[0].name).toBe('test');
+ })
+ .then(done)
+ .catch(done.fail);
+ });
+ });
});