diff options
| author | Teddy Wing | 2017-07-21 15:13:12 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-07-21 15:59:53 +0200 |
| commit | 490c4bba551803f45f5b9a854d10e5f56e4fa480 (patch) | |
| tree | 6f91fd3f10e4537dccbeee0e9ab83f50d1605973 /app/controllers/time_tables_controller.rb | |
| parent | 1dc71242b81f6bdcde4c5e093c36124011599675 (diff) | |
| download | chouette-core-490c4bba551803f45f5b9a854d10e5f56e4fa480.tar.bz2 | |
VehicleJourney: Remove 'departure time before arrival time' validation
Remove the `#vjas_departure_time_must_be_before_next_stop_arrival_time`
validation. This prevented vehicle journeys from being saved if they
contained at-stops with a day offset > 0.
For example:
Arrival | Departure
23:30 | 23:30
00:05 | 00:05
should work because 00:05 is on the next day, but it doesn't because the
validation sees it as !(23:30 < 00:05).
Luc says we should remove this validator in order for the day offsets to
work. He instructed me to comment the code instead of removing it
outright, because we're not sure yet what we want to do with this, and
he needs to look into the use-case for the validation. It could be that
we completely remove the validation method, or maybe we modify it
somewhat to play nicely with day offsets.
Skip the tests that check this validation method because we've commented
out the validation. Add a test to check that saving a vehicle journey
with a positive at-stop day offset works (it failed before commenting
out the validation). Unfortunately it seemed too complicated to use
`build_stubbed` in my new test, so I gave up and just used `create`.
Sorry test speedsters. Maybe you can refactor something more
enlightened.
Refs #3597
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
0 files changed, 0 insertions, 0 deletions
