From 18d756c03fce40648187ab18f29896d4f2c17b23 Mon Sep 17 00:00:00 2001 From: Zog Date: Fri, 19 Jan 2018 16:12:21 +0100 Subject: Add missing spec on VehicleJourneyAtStop --- spec/models/chouette/vehicle_journey_at_stop_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3