diff --git a/features/step_definitions/routing.rb b/features/step_definitions/routing.rb index ecefd79be..3628d4831 100644 --- a/features/step_definitions/routing.rb +++ b/features/step_definitions/routing.rb @@ -98,6 +98,12 @@ When /^I route I should get$/ do |table| if table.headers.include? 'distances' got['distances'] = distances 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 got['#'] = row['#'] # copy value so it always match end diff --git a/features/testbot/status.feature b/features/testbot/status.feature new file mode 100644 index 000000000..138b5a54f --- /dev/null +++ b/features/testbot/status.feature @@ -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 |