Fix broken spec

This commit is contained in:
Ivan Malagon 2017-12-12 15:56:16 +01:00
parent 43fec74372
commit 50ddfaa968
2 changed files with 7 additions and 5 deletions

View File

@ -72,8 +72,7 @@ describe('analysis-filters-params', () => {
max: 2e6
}
}
},
no_filters: 1
}
};

View File

@ -411,9 +411,12 @@ TestClient.prototype.getDataview = function(dataviewName, params, callback) {
self.keysToDelete['map_cfg|' + LayergroupToken.parse(layergroupId).token] = 0;
self.keysToDelete['user:localhost:mapviews:global'] = 5;
var urlParams = {
own_filter: params.hasOwnProperty('own_filter') ? params.own_filter : 1
};
var urlParams = {};
if (params.hasOwnProperty('no_filters')) {
urlParams.no_filters = params.no_filters;
} else {
urlParams.own_filter = params.hasOwnProperty('own_filter') ? params.own_filter : 1
}
['bbox', 'bins', 'start', 'end', 'aggregation', 'offset', 'categories'].forEach(function(extraParam) {
if (params.hasOwnProperty(extraParam)) {