From dbae7bc51423fc5d8b9f08fdd31a38705c5cf771 Mon Sep 17 00:00:00 2001 From: Zog Date: Wed, 30 May 2018 15:44:14 +0200 Subject: Refs #7227; Fix deletion of routes hving opposites --- spec/models/clean_up_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/models/clean_up_spec.rb') diff --git a/spec/models/clean_up_spec.rb b/spec/models/clean_up_spec.rb index f39ca2f2b..5848c1f77 100644 --- a/spec/models/clean_up_spec.rb +++ b/spec/models/clean_up_spec.rb @@ -273,8 +273,9 @@ RSpec.describe CleanUp, :type => :model do let(:cleaner) { create(:clean_up, referential: referential) } it "destroys routes not in the the referential" do - route = create(:route) - + route = create :route + opposite = create :route, line: route.line, opposite_route: route, wayback: route.opposite_wayback + cleaner.destroy_routes_outside_referential expect(Chouette::Route.exists?(route.id)).to be false -- cgit v1.2.3