diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-01-16 15:57:50 -0600 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-02-03 22:18:42 -0600 |
commit | d4e9dd96754324b8899330cd9e2cd480301d5b9c (patch) | |
tree | 1e39471e151f848a7d980baf88b6f60a672abcb1 /spec/javascripts | |
parent | 609e5f7db54c33e32d40b70f854c0f3469e5484c (diff) | |
download | gitlab-ce-d4e9dd96754324b8899330cd9e2cd480301d5b9c.tar.gz |
Add groupMembers to api.js
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/api_spec.js | 16 |
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'; |