Improved assertions for multilayer tests

This commit is contained in:
Daniel García Aubert 2016-02-01 18:39:34 +01:00
parent 640500a0e3
commit 8601a67e97

View File

@ -400,27 +400,11 @@ describe('multilayer', function() {
function jsonp_test(body) {
assert.ok(body.layergroupid);
expected_token = LayergroupToken.parse(body.layergroupid).token;
assert.deepEqual(body.metadata, {
layers: [{
type: "mapnik",
meta: {
stats: [{
type: "table",
name: "public.test_table",
features: -1
}]
}
}, {
type: "mapnik",
meta: {
stats: [{
type: "table",
name: "public.test_table",
features: -1
}]
}
}]
});
assert.ok(body.metadata.layers.length === 2);
assert.ok(body.metadata.layers[0].type === 'mapnik');
assert.ok(body.metadata.layers[0].meta);
assert.ok(body.metadata.layers[1].type === 'mapnik');
assert.ok(body.metadata.layers[1].meta);
didRunJsonCallback = true;
}
eval(res.body);