2014-10-09 08:30:06 -04:00
|
|
|
@routing @status @testbot
|
2014-04-29 11:53:35 -04:00
|
|
|
Feature: Status messages
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the profile "testbot"
|
|
|
|
|
2014-04-29 13:29:26 -04:00
|
|
|
Scenario: Route found
|
|
|
|
Given the node map
|
|
|
|
| a | b |
|
|
|
|
|
|
|
|
Given the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route | status | message |
|
2016-03-31 20:27:30 -04:00
|
|
|
| a | b | ab,ab | 200 | |
|
|
|
|
| b | a | ab,ab | 200 | |
|
2014-04-29 13:29:26 -04:00
|
|
|
|
2014-04-29 11:53:35 -04:00
|
|
|
Scenario: No route found
|
|
|
|
Given the node map
|
|
|
|
| a | b |
|
|
|
|
| | |
|
|
|
|
| c | d |
|
|
|
|
|
|
|
|
Given the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| cd |
|
2014-05-16 10:13:25 -04:00
|
|
|
|
2014-04-29 11:53:35 -04:00
|
|
|
When I route I should get
|
|
|
|
| from | to | route | status | message |
|
2016-03-31 20:27:30 -04:00
|
|
|
| a | b | ab,ab | 200 | |
|
|
|
|
| c | d | cd,cd | 200 | |
|
2016-03-29 21:30:37 -04:00
|
|
|
| a | c | | 400 | Impossible route between points |
|
|
|
|
| b | d | | 400 | Impossible route between points |
|
2014-04-29 13:29:26 -04:00
|
|
|
|
|
|
|
Scenario: Malformed requests
|
|
|
|
Given the node locations
|
|
|
|
| node | lat | lon |
|
|
|
|
| a | 1.00 | 1.00 |
|
|
|
|
| b | 1.01 | 1.00 |
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
|
|
|
|
When I route I should get
|
2015-12-16 22:14:06 -05:00
|
|
|
| request | status | message |
|
2016-03-29 21:30:37 -04:00
|
|
|
| viaroute?loc=1,1&loc=1.01,1 | 200 | |
|
2015-12-16 22:14:06 -05:00
|
|
|
| nonsense | 400 | Service not found |
|
|
|
|
| nonsense?loc=1,1&loc=1.01,1 | 400 | Service not found |
|
|
|
|
| | 400 | Query string malformed close to position 0 |
|
|
|
|
| / | 400 | Query string malformed close to position 0 |
|
|
|
|
| ? | 400 | Query string malformed close to position 0 |
|
|
|
|
| viaroute?loc= | 400 | Query string malformed close to position 9 |
|
|
|
|
| viaroute?loc=1 | 400 | Query string malformed close to position 9 |
|
2015-12-18 12:18:48 -05:00
|
|
|
| viaroute?loc=1,1 | 400 | Invalid coordinates |
|
2015-12-16 22:14:06 -05:00
|
|
|
| viaroute?loc=1,1,1 | 400 | Query string malformed close to position 17 |
|
|
|
|
| viaroute?loc=x | 400 | Query string malformed close to position 9 |
|
|
|
|
| viaroute?loc=x,y | 400 | Query string malformed close to position 9 |
|
|
|
|
| viaroute?loc=1,1&loc= | 400 | Query string malformed close to position 17 |
|
|
|
|
| viaroute?loc=1,1&loc=1 | 400 | Query string malformed close to position 17 |
|
2016-03-29 21:30:37 -04:00
|
|
|
| viaroute?loc=1,1&loc=1,1 | 200 | |
|
2015-12-16 22:14:06 -05:00
|
|
|
| viaroute?loc=1,1&loc=1,1,1 | 400 | Query string malformed close to position 25 |
|
|
|
|
| viaroute?loc=1,1&loc=x | 400 | Query string malformed close to position 17 |
|
|
|
|
| viaroute?loc=1,1&loc=x,y | 400 | Query string malformed close to position 17 |
|