summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-01-16 15:57:50 -0600
committerPaul Slaughter <pslaughter@gitlab.com>2019-02-03 22:18:42 -0600
commitd4e9dd96754324b8899330cd9e2cd480301d5b9c (patch)
tree1e39471e151f848a7d980baf88b6f60a672abcb1 /spec/javascripts
parent609e5f7db54c33e32d40b70f854c0f3469e5484c (diff)
downloadgitlab-ce-d4e9dd96754324b8899330cd9e2cd480301d5b9c.tar.gz
Add groupMembers to api.js
Diffstat (limited to 'spec/javascripts')
-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';