tests covering no route found
This commit is contained in:
parent
7b0b378abc
commit
85148d1283
@ -98,6 +98,12 @@ When /^I route I should get$/ do |table|
|
|||||||
if table.headers.include? 'distances'
|
if table.headers.include? 'distances'
|
||||||
got['distances'] = distances
|
got['distances'] = distances
|
||||||
end
|
end
|
||||||
|
if table.headers.include? 'status'
|
||||||
|
got['status'] = json['status'].to_s
|
||||||
|
end
|
||||||
|
if table.headers.include? 'message'
|
||||||
|
got['message'] = json['status_message']
|
||||||
|
end
|
||||||
if table.headers.include? '#' # comment column
|
if table.headers.include? '#' # comment column
|
||||||
got['#'] = row['#'] # copy value so it always match
|
got['#'] = row['#'] # copy value so it always match
|
||||||
end
|
end
|
||||||
|
23
features/testbot/status.feature
Normal file
23
features/testbot/status.feature
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
@routing @status
|
||||||
|
Feature: Status messages
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "testbot"
|
||||||
|
|
||||||
|
Scenario: No route found
|
||||||
|
Given the node map
|
||||||
|
| a | b |
|
||||||
|
| | |
|
||||||
|
| c | d |
|
||||||
|
|
||||||
|
Given the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| cd |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | status | message |
|
||||||
|
| a | b | ab | 0 | Found route between points |
|
||||||
|
| c | d | cd | 0 | Found route between points |
|
||||||
|
| a | c | | 207 | Cannot find route between points |
|
||||||
|
| b | d | | 207 | Cannot find route between points |
|
Loading…
Reference in New Issue
Block a user