diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-19 15:07:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-19 15:07:35 +0300 |
commit | e3764d340e2849fccee8c06278d1f5f686edd35b (patch) | |
tree | 23de7fe0eaa58a82c3a72eb8ff4a195e24627eb7 /spec/frontend/api_spec.js | |
parent | e3d67bcff7b8bc6a453d0814d404a9a61d97bc0f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/api_spec.js')
-rw-r--r-- | spec/frontend/api_spec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/api_spec.js b/spec/frontend/api_spec.js index cef50bf553c..c0126b2330d 100644 --- a/spec/frontend/api_spec.js +++ b/spec/frontend/api_spec.js @@ -151,6 +151,21 @@ describe('Api', () => { }); }); + describe('updateProject', () => { + it('update a project with the given payload', done => { + const projectPath = 'foo'; + const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${projectPath}`; + mock.onPut(expectedUrl).reply(200, { foo: 'bar' }); + + Api.updateProject(projectPath, { foo: 'bar' }) + .then(({ data }) => { + expect(data.foo).toBe('bar'); + done(); + }) + .catch(done.fail); + }); + }); + describe('projectUsers', () => { it('fetches all users of a particular project', done => { const query = 'dummy query'; |