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