Return first alternative in tests
This commit is contained in:
parent
fd000cad86
commit
d48ee84ae7
@ -75,8 +75,10 @@ module.exports = function () {
|
||||
got.route = (instructions || '').trim();
|
||||
|
||||
if (headers.has('alternative')) {
|
||||
got.alternative = json.found_alternative ?
|
||||
this.wayList(json.alternative_instructions[0]) : '';
|
||||
// TODO examine more than first alternative?
|
||||
got.alternative ='';
|
||||
if (json.routes && json.routes.length > 1)
|
||||
got.alternative = this.wayList(json.routes[1]);
|
||||
}
|
||||
|
||||
var distance = hasRoute && json.routes[0].distance,
|
||||
|
@ -19,7 +19,7 @@ Feature: Alternative route
|
||||
| ca | yes |
|
||||
|
||||
And the query options
|
||||
| alt | true |
|
||||
| alternative | true |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | alternative |
|
||||
|
Loading…
Reference in New Issue
Block a user