Serve TileJSONs on /{prefix}.json

This commit is contained in:
Petr Sloup
2016-03-09 19:18:59 +01:00
parent 9efa22b52b
commit 6f644a4c03
5 changed files with 33 additions and 39 deletions

View File

@@ -17,17 +17,17 @@ describe('Metadata', function() {
});
});
describe('/test/index.json', function() {
describe('/test.json', function() {
it('is json', function(done) {
supertest(app)
.get('/test/index.json')
.get('/test.json')
.expect(200)
.expect('Content-Type', /application\/json/, done);
});
it('has valid basename and tiles', function(done) {
supertest(app)
.get('/test/index.json')
.get('/test.json')
.expect(function(res) {
res.body.basename.should.equal('test');
res.body.tiles.length.should.be.greaterThan(0);