diff options
| author | Teddy Wing | 2017-05-30 15:29:14 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-05-31 17:57:36 +0200 |
| commit | d84e2cd810a643c8f3de3cadb24c019d3bf5f744 (patch) | |
| tree | 159500e21d25e937a3bc52df4e4c5958f8add2f5 | |
| parent | 43c14bc8c916d00a9c478f1e78d5860977c56bbe (diff) | |
| download | chouette-core-d84e2cd810a643c8f3de3cadb24c019d3bf5f744.tar.bz2 | |
vehicle_journey_at_stops_day_offset_spec.rb: Get rid of hard-coded date
I used '2000-01-01' because that's what the VehicleJourneyfactory does
for VehicleJourneyAtStops.
Ultimately, though, explicitly setting a date is confusing because the
`arrival_time` & `departure_time` fields should be time-only, and not
have dates.
The date is added automatically but isn't used and it shouldn't matter
that it's there. (My guess is that it's added by the database adapter or
something like that.)
To make this code less confusing and make it clear that we only care
about the times, get rid of the dates.
Refs #3596
| -rw-r--r-- | spec/models/chouette/vehicle_journey_at_stops_day_offset_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/chouette/vehicle_journey_at_stops_day_offset_spec.rb b/spec/models/chouette/vehicle_journey_at_stops_day_offset_spec.rb index f47d7dfd1..8010cf9b2 100644 --- a/spec/models/chouette/vehicle_journey_at_stops_day_offset_spec.rb +++ b/spec/models/chouette/vehicle_journey_at_stops_day_offset_spec.rb @@ -14,8 +14,8 @@ describe Chouette::VehicleJourneyAtStop do ].each do |arrival_time, departure_time| at_stops << build( :vehicle_journey_at_stop, - arrival_time: "2000-01-01 #{arrival_time} UTC", - departure_time: "2000-01-01 #{departure_time} UTC", + arrival_time: arrival_time, + departure_time: departure_time, # TODO: make this the default arrival_day_offset: 0, |
