diff options
| author | Zog | 2018-01-19 16:12:21 +0100 |
|---|---|---|
| committer | Zog | 2018-01-19 16:12:28 +0100 |
| commit | 18d756c03fce40648187ab18f29896d4f2c17b23 (patch) | |
| tree | 0a7c8e32a7d8985a0bd01d6920b9a769cee9c84f | |
| parent | 6b0771ae11c1051f2e0ea3fd6211ffd85b158f7a (diff) | |
| download | chouette-core-18d756c03fce40648187ab18f29896d4f2c17b23.tar.bz2 | |
Add missing spec on VehicleJourneyAtStop
| -rw-r--r-- | spec/models/chouette/vehicle_journey_at_stop_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/chouette/vehicle_journey_at_stop_spec.rb b/spec/models/chouette/vehicle_journey_at_stop_spec.rb index 4d4a1794e..02306883c 100644 --- a/spec/models/chouette/vehicle_journey_at_stop_spec.rb +++ b/spec/models/chouette/vehicle_journey_at_stop_spec.rb @@ -61,6 +61,17 @@ RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do expect(at_stop.departure_local).to eq at_stop.send(:format_time, at_stop.departure_time - 6.hours) expect(at_stop.arrival_local).to eq at_stop.send(:format_time, at_stop.arrival_time - 6.hours) end + + context "with a wrong Timezone" do + before do + at_stop.stop_point.stop_area.time_zone = "Gotham City" + end + + it "should not offset times" do + expect(at_stop.departure_local).to eq at_stop.send(:format_time, at_stop.departure_time) + expect(at_stop.arrival_local).to eq at_stop.send(:format_time, at_stop.arrival_time) + end + end end end |
