aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
AgeCommit message (Collapse)Author
2018-04-24Refs #6445 Update specs according to new validationscedricnjanga
2018-04-22Fixes JourneyPattern specs (by adding position in JourneyPattern state). ↵Alban Peignier
Refs #6193
2018-04-22Fixes JourneyPattern specs with distance is not defined/zero. Refs #6413Alban Peignier
2018-04-22Fixes Calendar::Period specs. Refs #5519Alban Peignier
2018-04-19Refs #5519; Authorize 1-day calendarsZog
2018-04-19Merge pull request #488 from af83/6477-use-custom-fields-in-checksumsAlban Peignier
Use custom fields values in checksum calculation. Refs #6477
2018-04-18Merge pull request #487 from ↵Alban Peignier
af83/6410-route--don,t-run-calculate_costs-during-referential-mer Route: Don't run `#calculate_costs!` during a referential merge. Fixes #6410
2018-04-18Manage download uri in Import::Gtfs (with or without schema or port). Refs #6368Alban Peignier
2018-04-16Refs #6477; Use custom fields values in checksum calculation6477-use-custom-fields-in-checksumsZog
2018-04-16Route: Don't run `#calculate_costs!` during a referential merge6410-route--don,t-run-calculate_costs-during-referential-merTeddy Wing
This callback got triggered during a referential merge, but it isn't needed at that point. It should only be executed as a result of a user updating the route (via the web interface). Using Alban's suggestion, we can detect that we're in the process of a merge if the associated referential is in a `ReferentialSuite`. Use this as a condition to run the callback. Refs #6410
2018-04-16Refs #6179; Update acts_as_list6179-update-acts_as_listZog
And (hopefully) fix bugs on routes having duplicated positions
2018-04-16Route: Change `#calculate_costs!` to `after_commit` callbackTeddy Wing
Use an `after_commit` instead of an `after_save`. The `after_save` could cause intermittent problems due to Sidekiq starting before the record/transaction actually gets committed to the database. In those cases, the record wouldn't be found and cause an error. With an `after_commit` callback, the record is sure to be committed before Sidekiq takes over. Additionally, limit the callback to `:create` and `:update` because otherwise it will be active on `:destroy` by default also. This work isn't relevant on destroy, so don't do it then. Update the tests: * Update labels * Use `build` instead of `create` because we're saving the record at the end anyway so we don't need an object that starts out persisted * Use `truncation: true` for these tests because otherwise the `commit` callback doesn't get called due to transactional teardown Refs #6407
2018-04-11Specs cleanupZog
2018-04-11Fix specs (WIP)Zog
2018-04-10Refs #6461; Don't initilialize CustomFields when they are not loaded by the ↵Zog
model
2018-04-10Merge pull request #438 from af83/6368-gtfs-importLuc Donnet
GTFS import (first step)
2018-04-09Refs #6367; Add a merge mechanismZog
And use it in the Referential merge operation
2018-04-09Refs #6367; Add metadata to other versioned modelsZog
2018-04-09Refs #6367; Add metadata to routesZog
2018-04-05Merge pull request #412 from af83/6217-extrapolate-border-passing-timesLuc Donnet
6217 Add a method to fill blanks in journeys passing times
2018-04-04Delete unused spec because we add a parameter to the function duplicate Refs ↵Luc Donnet
#6226
2018-04-04Fix specsZog
2018-04-04:fire: logsZog
2018-04-04Fix specsZog
2018-04-04Fix specsZog
2018-04-04Refs #6089; Adds `attachment` Custom FieldsZog
As well as an helper to render them in a partial
2018-04-03Use match_array to test expected_attributes. Refs #63686368-gtfs-importAlban Peignier
2018-04-02Import TimeTableDates from calendar dates. Refs #6368Alban Peignier
2018-04-01Create Referential in Import::Gtfs. Test file with ↵Alban Peignier
Import::Gtfs.accept_file?. Refs #6368
2018-03-31Import calendars before testing trips import. Refs #6368Alban Peignier
2018-03-31Download imported file on a local file. Refs #6368Alban Peignier
2018-03-31Add calendar imports to Import::Gtfs. Refs #6368Alban Peignier
2018-03-30Merge pull request #360 from af83/new-uniqueness-validation-for-ccblocksLuc Donnet
New uniqueness validation for ccblocks
2018-03-30Initial import for agencies, stops, routes, trips and stop_times. Refs #6368Alban Peignier
2018-03-29Refs #4658; Remove `current_functional_scope`Zog
2018-03-29Refs #6075 Change default attributes for stop areascedricnjanga
2018-03-29Refs #6075 Replace after_commit callback to after_create for the ↵cedricnjanga
set_defaults method
2018-03-29Refs #6075 Set defaults attributes for stop point depending on stop area kindcedricnjanga
2018-03-28Merge pull request #398 from af83/6259-calendar-mailerLuc Donnet
Refs #6259 Only send mails to users from same workgroup after create/…
2018-03-27Refs #6201; Remove short_name from calendarsZog
2018-03-26Refs #6217; Add a method to fill blanks in journeys passing timesZog
When a passing time at a border can be extrapolated from other values.
2018-03-26Use utc time to make expectation with strftime (when timezone are not ↵Alban Peignier
standard). Refs #6047
2018-03-21Only notify parent when Import is finished. Refs #6243Alban Peignier
2018-03-21Refs #6259 Only send mails to users from same workgroup after create/update ↵6259-calendar-mailercedricnjanga
of shared calendars
2018-03-20Don't use Import::Base#status_changed? into #notify_parent (status can be ↵Alban Peignier
changed by java side). Refs #6243
2018-03-15Merge pull request #379 from ↵Alban Peignier
af83/6095-route--calculate-distance-and-time-cost-between-stops Calculate distance and time cost between Route stops. Refs #6095
2018-03-15Rename export spec to use the right classes Refs #6133 @1Luc Donnet
2018-03-15Route: Don't run `#calculate_costs!` on callback if TomTom disabledTeddy Wing
We say `TomTom` is disabled when no API key is present. If this is the case, the `after_save` callback that uses it shouldn't be executed. I had to change my `API_KEY` constant to an instance variable to be able to change it for testing. Refs #6095
2018-03-15Merge pull request #377 from af83/6107-bind-stop_area_referential-and-workgroupsAlban Peignier
Refs 6106 & 6107. Binds LineReferentials and StopAreaReferentials to Workgroups
2018-03-15Use confirmed StopAreas in SimpleImporter spec. Refs #6033Alban Peignier