fix tests to reflect proper rounding of travel times

This commit is contained in:
Dennis Luxen
2014-04-25 13:23:27 +02:00
parent 2ec952032a
commit ca6515c58a
5 changed files with 17 additions and 17 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ def test_routability_row i
r[:status] = route_status r[:response]
if r[:status].empty? == false
r[:route] = way_list r[:json]['route_instructions']
if r[:route]=="w#{i}"
r[:time] = r[:json]['route_summary']['total_time']
r[:distance] = r[:json]['route_summary']['total_distance']
@@ -24,7 +24,7 @@ def test_routability_row i
end
result[direction] = r
end
# check if forw and backw returned the same values
result['bothw'] = {}
[:status,:time,:distance,:speed].each do |key|
@@ -62,12 +62,12 @@ Then /^routability should be$/ do |table|
else
raise "*** Unknown expectation format: #{want}"
end
if FuzzyMatch.match output_row[direction], want
output_row[direction] = row[direction]
end
end
if output_row != row
log_fail row,output_row,result
end