summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-02-04 17:58:50 +0000
committerPhil Hughes <me@iamphill.com>2019-02-04 17:58:50 +0000
commite53471727e46c3f2c29836ab1cca3823591fa567 (patch)
tree61cd10f41b8b71853ce6ff8b71122f8dad2a8c29 /spec
parentad513afc3f9efb81ef40ff5f5fa8c4d21f063ce1 (diff)
parentd4e9dd96754324b8899330cd9e2cd480301d5b9c (diff)
downloadgitlab-ce-e53471727e46c3f2c29836ab1cca3823591fa567.tar.gz
Merge branch 'fe-api-group-members' into 'master'
Add groupMembers to api.js See merge request gitlab-org/gitlab-ce!24892
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/api_spec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/javascripts/api_spec.js b/spec/javascripts/api_spec.js
index 9d55c615450..1e9470970ff 100644
--- a/spec/javascripts/api_spec.js
+++ b/spec/javascripts/api_spec.js
@@ -49,6 +49,22 @@ describe('Api', () => {
});
});
+ describe('groupMembers', () => {
+ it('fetches group members', done => {
+ const groupId = '54321';
+ const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/groups/${groupId}/members`;
+ const expectedData = [{ id: 7 }];
+ mock.onGet(expectedUrl).reply(200, expectedData);
+
+ Api.groupMembers(groupId)
+ .then(({ data }) => {
+ expect(data).toEqual(expectedData);
+ })
+ .then(done)
+ .catch(done.fail);
+ });
+ });
+
describe('groups', () => {
it('fetches groups', done => {
const query = 'dummy query';