mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
Add test for creating features when name is not unique
This commit is contained in:
parent
5a5bac2d6c
commit
f2fdf4c771
@ -37,7 +37,7 @@
|
||||
"trailing" : true,
|
||||
"maxparams" : 3,
|
||||
"maxdepth" : 4,
|
||||
"maxstatements" : 10,
|
||||
"maxstatements" : 20,
|
||||
"maxcomplexity" : 10,
|
||||
"maxlen" : 120,
|
||||
|
||||
|
@ -88,4 +88,12 @@ describe('The features api', function () {
|
||||
.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