test query params are an object
This commit is contained in:
committed by
Patrick Niklaus
parent
07f3e2d457
commit
6a65261765
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user