From 9a4aa7c1fa8ba1fc81d8826cf40180fca7541686 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Wed, 1 Jun 2016 15:00:30 +0200 Subject: [PATCH] Add params to url if present in override option --- test/support/test-client.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/support/test-client.js b/test/support/test-client.js index c428e8ad..6aec4405 100644 --- a/test/support/test-client.js +++ b/test/support/test-client.js @@ -92,9 +92,12 @@ TestClient.prototype.getWidget = function(widgetName, params, callback) { var urlParams = { own_filter: params.hasOwnProperty('own_filter') ? params.own_filter : 1 }; - if (params && params.bbox) { - urlParams.bbox = params.bbox; - } + ['bbox', 'bins', 'start', 'end'].forEach(function(extraParam) { + if (params.hasOwnProperty(extraParam)) { + urlParams[extraParam] = params[extraParam]; + } + }); + url = '/api/v1/map/' + layergroupId + '/0/widget/' + widgetName + '?' + qs.stringify(urlParams); assert.response(server,