diff options
| author | Xinhui | 2016-11-15 15:22:34 +0100 | 
|---|---|---|
| committer | Xinhui | 2016-11-15 15:22:34 +0100 | 
| commit | e652bbfa3f1665a405b361488a9e48a09b8ebb64 (patch) | |
| tree | c3fe1a060ed2fb2e3c5b213589d3268cfbc45a98 /spec | |
| parent | 77c6b9b88c8b63c6d59c820cbb084fd99f48a011 (diff) | |
| download | chouette-core-e652bbfa3f1665a405b361488a9e48a09b8ebb64.tar.bz2 | |
Remove line and stop_area from cleanup
Refs #1933
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/clean_up_spec.rb | 38 | 
1 files changed, 0 insertions, 38 deletions
| diff --git a/spec/models/clean_up_spec.rb b/spec/models/clean_up_spec.rb index e603b09b0..583e28136 100644 --- a/spec/models/clean_up_spec.rb +++ b/spec/models/clean_up_spec.rb @@ -6,50 +6,12 @@ RSpec.describe CleanUp, :type => :model do    it { should validate_presence_of(:expected_date) }    it { should belong_to(:referential) } -  it 'should convert initialize attribute to boolean' do -    params  = { keep_lines: "0", keep_stops: "1" } -    cleaner = CleanUp.new(params) -    expect(cleaner.keep_lines).to eq false -    expect(cleaner.keep_stops).to eq true -  end - -  it 'should delete group of line without lines' do -    create_list(:group_of_line, 2) -    create_list(:line, 2, group_of_lines: [create(:group_of_line)]) -    expect(cleaner.clean_group_of_lines).to eq 2 -  end - -  it 'should delete company without lines' do -    create_list(:company, 2) -    create_list(:line, 2) -    expect(cleaner.clean_companies).to eq 2 -  end - -  it 'should delete physical stop_areas without stop_points' do -    create_list(:stop_area, 2) -    create_list(:stop_point, 2) -    Chouette::StopArea.update_all(area_type: "Quay") -    expect(cleaner.clean_physical_stop_areas).to eq 2 -  end -    it 'should delete vehiclejourneys without timetables' do      create_list(:vehicle_journey, 2)      create_list(:vehicle_journey, 2, time_tables:[create(:time_table)])      expect(cleaner.clean_vehicle_journeys).to eq 2    end -  it 'should delete lines without routes' do -    create_list(:line, 2) -    create_list(:route, 2, line: create(:line)) -    expect(cleaner.clean_lines).to eq 2 -  end - -  it 'should delete routes without journeypatterns' do -    create_list(:route, 2) -    create_list(:journey_pattern, 2, route: create(:route)) -    expect(cleaner.clean_routes).to eq 2 -  end -    it 'should delete journeypatterns without vehicle journeys' do      create_list(:journey_pattern, 2)      create_list(:vehicle_journey, 2, journey_pattern: create(:journey_pattern)) | 
