Add test to check the headers exist while instantiating a map

This commit is contained in:
Daniel García Aubert
2020-05-26 16:28:44 +02:00
parent ddefb1a6ca
commit aff5c9a614
3 changed files with 118 additions and 3 deletions
+10 -3
View File
@@ -1033,9 +1033,13 @@ TestClient.prototype.getLayergroup = function (params, callback) {
queryParams.aggregation = params.aggregation;
}
if (params.client !== undefined) {
queryParams.client = params.client;
}
const path = templateId
? urlNamed + '/' + templateId + '?' + qs.stringify(queryParams)
: url;
? `${urlNamed}/${templateId}?${qs.stringify(queryParams)}`
: `${url}?${qs.stringify(queryParams)}`;
assert.response(self.server,
{
@@ -1058,12 +1062,15 @@ TestClient.prototype.getLayergroup = function (params, callback) {
if (res.statusCode === 200 && self.template && self.template.layergroup && self.template.layergroup.stat_tag) {
self.keysToDelete[`user:localhost:mapviews:stat_tag:${self.template.layergroup.stat_tag}`] = 5;
}
if (res.statusCode === 200 && self.mapConfig && self.mapConfig.stat_tag) {
self.keysToDelete[`user:localhost:mapviews:stat_tag:${self.mapConfig.stat_tag}`] = 5;
}
}
if (err) {
return callback(err);
}
return callback(null, parsedBody);
return callback(null, parsedBody, res);
}
);
}