diff --git a/features/step_definitions/matching.js b/features/step_definitions/matching.js index 4b3b96cb0..ef66d7b3c 100644 --- a/features/step_definitions/matching.js +++ b/features/step_definitions/matching.js @@ -16,10 +16,13 @@ module.exports = function () { var headers = new Set(table.raw()[0]); + got.code = 'unknown'; if (res.body.length) { json = JSON.parse(res.body); + got.code = json.code; } + if (headers.has('status')) { got.status = json.status.toString(); } @@ -33,7 +36,7 @@ module.exports = function () { got['#'] = row['#']; } - var subMatchings = [], + var subMatchings = [''], turns = '', route = '', duration = '', diff --git a/features/support/shared_steps.js b/features/support/shared_steps.js index 5dd86473c..fb21e17bf 100644 --- a/features/support/shared_steps.js +++ b/features/support/shared_steps.js @@ -39,6 +39,8 @@ module.exports = function () { let json = JSON.parse(body); + got.code = json.code; + let hasRoute = json.code === 'Ok'; if (hasRoute) {