summaryrefslogtreecommitdiff
path: root/spec/frontend/api_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/api_spec.js')
-rw-r--r--spec/frontend/api_spec.js15
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';