Fix context returned in JSON error (had null bytes).

Update status test cases to match new API.
This commit is contained in:
Daniel Patterson
2016-04-01 10:42:42 -07:00
committed by Patrick Niklaus
parent 89d56e1cd1
commit 2cf19010e3
2 changed files with 24 additions and 21 deletions
+20 -20
View File
@@ -39,29 +39,29 @@ Feature: Status messages
Given the node locations
| node | lat | lon |
| a | 1.00 | 1.00 |
| b | 1.01 | 1.00 |
| b | 2.00 | 1.00 |
And the ways
| nodes |
| ab |
When I route I should get
| request | status | message |
| viaroute?loc=1,1&loc=1.01,1 | 200 | |
| 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 |
| viaroute?loc=1,1 | 400 | Invalid coordinates |
| 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 |
| viaroute?loc=1,1&loc=1,1 | 200 | |
| 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 |
| request | status | message |
| route/v1/driving/1,1;1,2 | 200 | |
| nonsense | 400 | URL string malformed close to position 0: "/no" |
| nonsense/v1/driving/1,1;1,2 | 400 | Service nonsense not found! |
| | 400 | URL string malformed close to position 0: "/" |
| / | 400 | URL string malformed close to position 0: "//" |
| ? | 400 | URL string malformed close to position 0: "/?" |
| route/v1/driving | 400 | URL string malformed close to position 0: "/ro" |
| route/v1/driving/ | 400 | URL string malformed close to position 0: "/ro" |
| route/v1/driving/1 | 400 | Query string malformed close to position 0 |
| route/v1/driving/1,1 | 400 | Number of coordinates needs to be at least two. |
| route/v1/driving/1,1,1 | 400 | Query string malformed close to position 3 |
| route/v1/driving/x | 400 | Query string malformed close to position 0 |
| route/v1/driving/x,y | 400 | Query string malformed close to position 0 |
| route/v1/driving/1,1; | 400 | Query string malformed close to position 3 |
| route/v1/driving/1,1;1 | 400 | Query string malformed close to position 3 |
| route/v1/driving/1,1;1,1,1 | 400 | Query string malformed close to position 7 |
| route/v1/driving/1,1;x | 400 | Query string malformed close to position 3 |
| route/v1/driving/1,1;x,y | 400 | Query string malformed close to position 3 |