More tests for the endpoints

This commit is contained in:
Petr Sloup
2016-03-09 13:22:06 +01:00
parent 9736649244
commit d6e17c1a3a
4 changed files with 103 additions and 7 deletions
+18
View File
@@ -16,4 +16,22 @@ describe('Metadata', function() {
}).end(done);
});
});
describe('/test/index.json', function() {
it('is json', function(done) {
supertest(app)
.get('/test/index.json')
.expect(200)
.expect('Content-Type', /application\/json/, done);
});
it('has valid basename and tiles', function(done) {
supertest(app)
.get('/test/index.json')
.expect(function(res) {
res.body.basename.should.equal('test');
res.body.tiles.length.should.be.greaterThan(0);
}).end(done);
});
});
});