aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorZog2018-05-30 15:44:14 +0200
committerZog2018-05-30 15:44:14 +0200
commitdbae7bc51423fc5d8b9f08fdd31a38705c5cf771 (patch)
tree12fb5b7d292154ce9ff7a4781476a603e5e16012 /spec
parent819b03075f74018b8f16a2f73fa7a526f704a675 (diff)
downloadchouette-core-custom-clean-on-routes.tar.bz2
Refs #7227; Fix deletion of routes hving oppositescustom-clean-on-routes
Diffstat (limited to 'spec')
-rw-r--r--spec/models/clean_up_spec.rb5
1 files changed, 3 insertions, 2 deletions
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