1
0
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:
andsandv 2015-02-10 17:19:32 +01:00
parent 5a5bac2d6c
commit f2fdf4c771
2 changed files with 9 additions and 1 deletions

View File

@ -37,7 +37,7 @@
"trailing" : true,
"maxparams" : 3,
"maxdepth" : 4,
"maxstatements" : 10,
"maxstatements" : 20,
"maxcomplexity" : 10,
"maxlen" : 120,

View File

@ -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);
});
});