test query params are an object

This commit is contained in:
Jeff Miccolis
2016-03-29 13:35:56 -04:00
committed by Patrick Niklaus
parent 07f3e2d457
commit 6a65261765
6 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = function () {
this.scenarioTitle = scenario.getName();
this.loadMethod = this.DEFAULT_LOAD_METHOD;
this.queryParams = [];
this.queryParams = {};
var d = new Date();
this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
this.resetData();
+2 -2
View File
@@ -60,8 +60,8 @@ module.exports = function () {
});
this.Given(/^the query options$/, (table, callback) => {
table.raw().forEach((tuple) => {
this.queryParams.push(tuple);
table.raw().forEach(tuple => {
this.queryParams[tuple[0]] = tuple[1]
});
callback();
+1 -1
View File
@@ -3,7 +3,7 @@ var assert = require('assert');
module.exports = function () {
this.When(/^I request \/(.*)$/, (path, callback) => {
this.reprocessAndLoadData(() => {
this.requestPath(path, [], (err, res, body) => {
this.requestPath(path, {}, (err, res, body) => {
this.response = res;
callback(err, res, body);
});