aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/clean_up_spec.rb
AgeCommit message (Collapse)Author
2018-05-30Refs #7227; Fix deletion of routes hving oppositescustom-clean-on-routesZog
2018-05-15CleanUp: Add `#destroy_empty`6854-clean-up--destroy-routes-outside-referentialTeddy Wing
Gives us a single call site to trigger the destruction of vehicle journeys, journey patterns, and routes without content. This was previously done directly in the `#clean` method, but since it's not needed during referential duplication (only during merges), we don't want to enable it by default. Thus now to activate the same old functionality, you would create a `CleanUp` like this: CleanUp.new(methods: [:destroy_empty]) Refs #6854
2018-05-14CleanUp: Add `#run_methods`Teddy Wing
This method is coupled with a new virtual attribute that can be used in the initializer like: CleanUp.new(methods: [:destroy_routes]) The method will run all methods specified in the `:methods` list. The plan is to replace the calls to `destroy_routes` etc. with a call to this method. The result will be a more configurable clean-up process, allowing users to selectively choose what to clean up by declaring what methods in the `CleanUp` model to call. Refs #6854
2018-05-14CleanUp spec: Pass ids to `#exists?` callTeddy Wing
Looks like I temporarily forgot that this method takes an ID. Refs #6854
2018-05-14CleanUp#destroy_routes_outside_referential: Test cascadeTeddy Wing
Ensure that `JourneyPattern`s and `VehicleJourney`s associated with orphaned routes get deleted in cascade. Refs #6854
2018-05-14CleanUp: Add `#destroy_routes_outside_referential`Teddy Wing
This builds on `#destroy_vehicle_journeys_outside_referential` (which will soon be removed in favour of this new method). It destroys orphaned routes in a referential. Refs #6854
2018-04-26Fixes problems in CleanUp specs. Refs #5372Alban Peignier
2017-07-12#4028 Clean Up end date must be greater than begin datecedricnjanga
2017-07-06Fix test according changes in model : boundaries are exclusive for between ↵cedricnjanga
clean up
2017-07-06Comment clean test, need to fix it latercedricnjanga
2017-07-06Change wording for clean up + add exclusive dates for between clean upaf83
2017-06-30Fix cleanup#destroy_time_tables should only destroy vehicle_journey of ↵Xinhui
deleted time_tables Refs #3917
2017-06-28Fix cleanup should only destroy vj without any time_tableXinhui
Refs #3917
2017-06-13Clean edit condition on date included or notXinhui
2017-06-09Cleanup add TimeTableDate in_out:false to overlapping periodsXinhui
2017-06-08Wip Cleanup time_tables time_table_dates time_table_periodsXinhui
2017-06-05Referential Cleanup add date_typeXinhui
Refs #3662
2016-11-16Model CleanUp add end_dateXinhui
Refs #1934
2016-11-15Remove line and stop_area from cleanupXinhui
Refs #1933
2016-11-14Wip refactoring cleanup modelXinhui
Refs #1933
2016-11-10Wip refactoring CleanUp clean methodXinhui
Refs #1933