diff options
| author | Simon Knox <psimyn@gmail.com> | 2017-09-06 15:02:30 +1000 |
|---|---|---|
| committer | Simon Knox <psimyn@gmail.com> | 2017-09-06 15:41:00 +1000 |
| commit | c28d52a3a5e745d20981151b89bfcad07c68fa9c (patch) | |
| tree | d51df26c80701f8e7b8a178119ffd09a895ad063 /spec/javascripts | |
| parent | b9aa55e1ea2ba226bd9bf4c6fb08fdec30e046c5 (diff) | |
| download | gitlab-ce-c28d52a3a5e745d20981151b89bfcad07c68fa9c.tar.gz | |
FE backport of group boards to reduce CE conflicts
Diffstat (limited to 'spec/javascripts')
| -rw-r--r-- | spec/javascripts/api_spec.js | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/spec/javascripts/api_spec.js b/spec/javascripts/api_spec.js index 2aa4fb1f6c6..72d1b8423ff 100644 --- a/spec/javascripts/api_spec.js +++ b/spec/javascripts/api_spec.js @@ -145,7 +145,7 @@ describe('Api', () => { }); }); - describe('newLabel', () => { + fdescribe('newLabel', () => { it('creates a new label', (done) => { const namespace = 'some namespace'; const project = 'some project'; @@ -167,6 +167,27 @@ describe('Api', () => { done(); }); }); + + it('creates a new group label', (done) => { + const namespace = 'some namespace'; + const labelData = { some: 'data' }; + const expectedUrl = `${dummyUrlRoot}/${namespace}/labels`; + const expectedData = { + label: labelData, + }; + spyOn(jQuery, 'ajax').and.callFake((request) => { + expect(request.url).toEqual(expectedUrl); + expect(request.dataType).toEqual('json'); + expect(request.type).toEqual('POST'); + expect(request.data).toEqual(expectedData); + return sendDummyResponse(); + }); + + Api.newLabel(namespace, null, labelData, (response) => { + expect(response).toBe(dummyResponse); + done(); + }); + }); }); describe('groupProjects', () => { |
