mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Add test for creating features when name is not unique
This commit is contained in:
parent
23182c852d
commit
00648bce16
@ -37,7 +37,7 @@
|
|||||||
"trailing" : true,
|
"trailing" : true,
|
||||||
"maxparams" : 3,
|
"maxparams" : 3,
|
||||||
"maxdepth" : 4,
|
"maxdepth" : 4,
|
||||||
"maxstatements" : 10,
|
"maxstatements" : 20,
|
||||||
"maxcomplexity" : 10,
|
"maxcomplexity" : 10,
|
||||||
"maxlen" : 120,
|
"maxlen" : 120,
|
||||||
|
|
||||||
|
@ -88,4 +88,12 @@ describe('The features api', function () {
|
|||||||
.expect(404, done);
|
.expect(404, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('refuses to create a feature with an existing name', function (done) {
|
||||||
|
request
|
||||||
|
.post('/features')
|
||||||
|
.send({name: 'featureX'})
|
||||||
|
.set('Content-Type', 'application/json')
|
||||||
|
.expect(403, done);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user