1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Add test for trying to get strategy that dose not exist

This commit is contained in:
andsandv 2015-02-10 18:28:17 +01:00 committed by Ivar Conradi Østhus
parent 5013a10186
commit 4e54c461ff
2 changed files with 8 additions and 1 deletions

View File

@ -30,7 +30,7 @@ describe('The features api', function () {
it('cant get feature that dose not exist', function (done) { it('cant get feature that dose not exist', function (done) {
request request
.get('/features/myFeature') .get('/features/myfeature')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
.expect(404, done); .expect(404, done);
}); });

View File

@ -22,6 +22,13 @@ describe('The strategy api', function () {
.expect(200, done); .expect(200, done);
}); });
it('cant get a strategy by name that dose not exist', function (done) {
request
.get('/strategies/mystrategy')
.expect('Content-Type', /json/)
.expect(404, done);
});
it('creates a new strategy', function (done) { it('creates a new strategy', function (done) {
request request
.post('/strategies') .post('/strategies')