diff --git a/features/step_definitions/options.rb b/features/step_definitions/options.rb index 99793ed66..38c9ea256 100644 --- a/features/step_definitions/options.rb +++ b/features/step_definitions/options.rb @@ -47,3 +47,7 @@ end Then /^stdout should contain (\d+) lines?$/ do |lines| expect(@stdout.lines.count).to eq( lines.to_i ) end + +Given (/^the query options$/) do |table| + @query_params = table.rows_hash +end diff --git a/features/step_definitions/routability.rb b/features/step_definitions/routability.rb index 161171fbc..03336e583 100644 --- a/features/step_definitions/routability.rb +++ b/features/step_definitions/routability.rb @@ -4,7 +4,7 @@ def test_routability_row i a = Location.new @origin[0]+(1+WAY_SPACING*i)*@zoom, @origin[1] b = Location.new @origin[0]+(3+WAY_SPACING*i)*@zoom, @origin[1] r = {} - r[:response] = request_route direction=='forw' ? [a,b] : [b,a] + r[:response] = request_route (direction=='forw' ? [a,b] : [b,a]), @query_params r[:query] = @query r[:json] = JSON.parse(r[:response].body) diff --git a/features/step_definitions/routing.rb b/features/step_definitions/routing.rb index 92b69ea2c..73bd5381d 100644 --- a/features/step_definitions/routing.rb +++ b/features/step_definitions/routing.rb @@ -7,7 +7,7 @@ When /^I route I should get$/ do |table| got = {'request' => row['request'] } response = request_url row['request'] else - params = {} + params = @query_params waypoints = [] if row['from'] and row['to'] node = find_node_by_name(row['from']) diff --git a/features/support/hooks.rb b/features/support/hooks.rb index 4c58a1750..ff8f10ff1 100644 --- a/features/support/hooks.rb +++ b/features/support/hooks.rb @@ -18,7 +18,7 @@ Before do |scenario| @scenario_title = scenario.scenario_outline.name end - + @query_params = {} @scenario_time = Time.now.strftime("%Y-%m-%dT%H:%m:%SZ") reset_data @has_logged_preprocess_info = false