diff options
| author | Alban Peignier | 2018-03-15 18:23:32 +0100 |
|---|---|---|
| committer | Luc Donnet | 2018-03-23 17:16:44 +0100 |
| commit | 5c78b1428380dbb9d9945ea66aabf749f32c4087 (patch) | |
| tree | 2647e25b607f74a9f108cd16516be840115c1c42 /spec | |
| parent | 8ff9c72521237f6f3ae5f2d7fc249da34137df6d (diff) | |
| download | chouette-core-5c78b1428380dbb9d9945ea66aabf749f32c4087.tar.bz2 | |
Avoid error when distance or time cost is ignored. Refs #6203
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/lib/route_way_cost_unit_converter_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/lib/route_way_cost_unit_converter_spec.rb b/spec/lib/route_way_cost_unit_converter_spec.rb index 624ef5052..3c5e51710 100644 --- a/spec/lib/route_way_cost_unit_converter_spec.rb +++ b/spec/lib/route_way_cost_unit_converter_spec.rb @@ -10,6 +10,10 @@ RSpec.describe RouteWayCostUnitConverter do '94435-97513' => { 'distance' => 35919, 'time' => 6174 + }, + '2-3' => { + 'distance' => nil, + 'time' => nil } } @@ -17,12 +21,16 @@ RSpec.describe RouteWayCostUnitConverter do RouteWayCostUnitConverter.convert(costs) ).to eq({ '1-2' => { - 'distance' => 35.22, + 'distance' => 35, 'time' => 93 }, '94435-97513' => { - 'distance' => 35.92, + 'distance' => 35, 'time' => 102 + }, + '2-3' => { + 'distance' => 0, + 'time' => 0 } }) end |
