diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-04 09:06:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-04 09:06:21 +0000 |
commit | 2b7a5214342baa2575b35868316ea9413d2afe1f (patch) | |
tree | f80a862f7fa382620b8f8a695d07b6d1734fc5f5 /spec/frontend/api_spec.js | |
parent | 15a2d004be2f79160752d77f701c0f08e7f96973 (diff) | |
download | gitlab-ce-2b7a5214342baa2575b35868316ea9413d2afe1f.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.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/frontend/api_spec.js b/spec/frontend/api_spec.js index 62ba0d36982..cef50bf553c 100644 --- a/spec/frontend/api_spec.js +++ b/spec/frontend/api_spec.js @@ -467,6 +467,26 @@ describe('Api', () => { }); }); + describe('user projects', () => { + it('fetches all projects that belong to a particular user', done => { + const query = 'dummy query'; + const options = { unused: 'option' }; + const userId = '123456'; + const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/users/${userId}/projects`; + mock.onGet(expectedUrl).reply(200, [ + { + name: 'test', + }, + ]); + + Api.userProjects(userId, query, options, response => { + expect(response.length).toBe(1); + expect(response[0].name).toBe('test'); + done(); + }); + }); + }); + describe('commitPipelines', () => { it('fetches pipelines for a given commit', done => { const projectId = 'example/foobar'; |