Test invalid format for vector layergroup

This commit is contained in:
Daniel García Aubert
2017-11-29 14:10:56 +01:00
parent 8270699b8e
commit 330f8f3cb5
+31
View File
@@ -150,6 +150,37 @@ return function () {
done();
});
});
it.only('should fail when the format requested is not mvt', function (done) {
const options = {
format: 'png',
response: {
status: 400,
headers: {
'Content-Type': 'application/json; charset=utf-8'
}
}
};
this.testClient.getTile(0, 0, 0, options, (err, res, body) => {
if (err) {
return done(err);
}
assert.deepEqual(body, {
"errors": [
"Invalid format: only mvt format is available for layers without CartoCSS defined"
],
"errors_with_context":[
{
"type":"tile",
"message":"Invalid format: only mvt format is available for layers without CartoCSS defined"
}
]
});
done();
});
});
});
describe('analysis-layers-dataviews-mvt', function () {