enable setting query params in cuke tests
This commit is contained in:
parent
11e6e74f09
commit
73b32bb45e
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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'])
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user