]> git.openstreetmap.org Git - rails.git/commitdiff
Assign proper sequence numbers to relation members in tests
authorTom Hughes <tom@compton.nu>
Tue, 10 Oct 2023 20:35:00 +0000 (21:35 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 26 Oct 2023 17:22:41 +0000 (18:22 +0100)
test/controllers/api/relations_controller_test.rb
test/factories/old_relation_member.rb
test/factories/relation_member.rb

index 7d011c17ff3678c76dce61c391cee4acf7ddaf4a..cdef1f5bac8dea5da047f9c10c6bc527cbfd2c89 100644 (file)
@@ -102,7 +102,7 @@ module Api
       second_relation = create(:relation_member, :member => node).relation
       _super_relation = create(:relation_member, :member => second_relation).relation
       # should combine multiple relation_member references into just one relation entry
-      create(:relation_member, :member => node, :relation => relation_with_node, :sequence_id => 2)
+      create(:relation_member, :member => node, :relation => relation_with_node)
       # should not include deleted relations
       deleted_relation = create(:relation, :deleted)
       create(:relation_member, :member => node, :relation => deleted_relation)
@@ -122,7 +122,7 @@ module Api
       second_relation = create(:relation_member, :member => way).relation
       _super_relation = create(:relation_member, :member => second_relation).relation
       # should combine multiple relation_member references into just one relation entry
-      create(:relation_member, :member => way, :relation => relation_with_way, :sequence_id => 2)
+      create(:relation_member, :member => way, :relation => relation_with_way)
       # should not include deleted relations
       deleted_relation = create(:relation, :deleted)
       create(:relation_member, :member => way, :relation => deleted_relation)
@@ -142,7 +142,7 @@ module Api
       second_relation = create(:relation_member, :member => relation).relation
       _super_relation = create(:relation_member, :member => second_relation).relation
       # should combine multiple relation_member references into just one relation entry
-      create(:relation_member, :member => relation, :relation => relation_with_relation, :sequence_id => 2)
+      create(:relation_member, :member => relation, :relation => relation_with_relation)
       # should not include deleted relations
       deleted_relation = create(:relation, :deleted)
       create(:relation_member, :member => relation, :relation => deleted_relation)
index 99305cd98bfff94126522bf6df200a51c15f6a72..34e0bd310f84c5f8fc5f9b0557a393b75390bb60 100644 (file)
@@ -1,5 +1,6 @@
 FactoryBot.define do
   factory :old_relation_member do
+    sequence(:sequence_id)
     member_role { "" }
 
     old_relation
index bba2e76330d93cadedf45ae41cabd613fbe98a69..f8e14905e36cd805b9eab2f86607ab81f8857c3b 100644 (file)
@@ -1,5 +1,6 @@
 FactoryBot.define do
   factory :relation_member do
+    sequence(:sequence_id)
     member_role { "" }
 
     relation