1
0
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:
andsandv 2015-02-10 17:19:32 +01:00 committed by Ivar Conradi Østhus
parent 23182c852d
commit 00648bce16
2 changed files with 9 additions and 1 deletions

View File

@ -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,

View File

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