1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00

Merge pull request #82 from finn-no/namingEvents

Adding some tests to the wrong branch
This commit is contained in:
Anders Olsen Sandvik 2015-02-10 17:33:25 +01:00
commit 397320886f
2 changed files with 16 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

@ -28,6 +28,13 @@ describe('The features api', function () {
.expect(200, done); .expect(200, done);
}); });
it('cant get feature that dose not exist', function (done) {
request
.get('/features/myFeature')
.expect('Content-Type', /json/)
.expect(404, done);
});
it('creates new feature toggle', function (done) { it('creates new feature toggle', function (done) {
request request
.post('/features') .post('/features')
@ -88,4 +95,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);
});
}); });