summaryrefslogtreecommitdiff
path: root/spec/frontend/api_spec.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-13 06:10:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-13 06:10:02 +0000
commit6c516c90efc656531d2d90f55dcc49b863e10158 (patch)
treee3d373cbee230c9acbcbd91f6448b9fb2bed7ce7 /spec/frontend/api_spec.js
parentcbc45b28c02f7e610dfa478e3a2b4d4bf6f4c7a4 (diff)
downloadgitlab-ce-6c516c90efc656531d2d90f55dcc49b863e10158.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.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/frontend/api_spec.js b/spec/frontend/api_spec.js
index 15485d9e38f..4f4de62c229 100644
--- a/spec/frontend/api_spec.js
+++ b/spec/frontend/api_spec.js
@@ -149,6 +149,36 @@ describe('Api', () => {
});
});
+ describe('groupMilestones', () => {
+ it('fetches group milestones', done => {
+ const groupId = '16';
+ const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/groups/${groupId}/milestones`;
+ const expectedData = [
+ {
+ id: 12,
+ iid: 3,
+ group_id: 16,
+ title: '10.0',
+ description: 'Version',
+ due_date: '2013-11-29',
+ start_date: '2013-11-10',
+ state: 'active',
+ updated_at: '2013-10-02T09:24:18Z',
+ created_at: '2013-10-02T09:24:18Z',
+ web_url: 'https://gitlab.com/groups/gitlab-org/-/milestones/42',
+ },
+ ];
+ mock.onGet(expectedUrl).reply(httpStatus.OK, expectedData);
+
+ Api.groupMilestones(groupId)
+ .then(({ data }) => {
+ expect(data).toEqual(expectedData);
+ })
+ .then(done)
+ .catch(done.fail);
+ });
+ });
+
describe('groups', () => {
it('fetches groups', done => {
const query = 'dummy query';