diff --git a/.jshintrc b/.jshintrc index 6cd19abfe9..5d4e4d2931 100644 --- a/.jshintrc +++ b/.jshintrc @@ -37,7 +37,7 @@ "trailing" : true, "maxparams" : 3, "maxdepth" : 4, - "maxstatements" : 10, + "maxstatements" : 20, "maxcomplexity" : 10, "maxlen" : 120, diff --git a/test/featureApiSpec.js b/test/featureApiSpec.js index c8fb88e0e7..d6c284176e 100644 --- a/test/featureApiSpec.js +++ b/test/featureApiSpec.js @@ -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); + }); + });