diff --git a/features/step_definitions/routability.js b/features/step_definitions/routability.js index 6b16d2996..ceeff4384 100644 --- a/features/step_definitions/routability.js +++ b/features/step_definitions/routability.js @@ -126,6 +126,7 @@ module.exports = function () { r.query = this.query; r.json = JSON.parse(body); + r.code = r.json.code; r.status = res.statusCode === 200 ? 'x' : null; if (r.status) { r.route = this.wayList(r.json.routes[0]); diff --git a/features/step_definitions/trip.js b/features/step_definitions/trip.js index 5a216acc6..69af69859 100644 --- a/features/step_definitions/trip.js +++ b/features/step_definitions/trip.js @@ -29,8 +29,10 @@ module.exports = function () { } var json; + got.code = 'unknown'; if (res.body.length) { json = JSON.parse(res.body); + got.code = json.code; } if (headers.has('status')) { @@ -153,11 +155,11 @@ module.exports = function () { if (row.source) { params.source = got.source = row.source; - } - + } + if (row.destination) { params.destination = got.destination = row.destination; - } + } if (row.hasOwnProperty('roundtrip')) { //roundtrip is a boolean so row.roundtrip alone doesn't work as a check here params.roundtrip = got.roundtrip = row.roundtrip;