From: Tom Hughes Date: Tue, 10 Oct 2023 20:35:00 +0000 (+0100) Subject: Assign proper sequence numbers to relation members in tests X-Git-Tag: live~999^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ee3f0454951ece06fe3466a4c12bb78302e67a0f Assign proper sequence numbers to relation members in tests --- diff --git a/test/controllers/api/relations_controller_test.rb b/test/controllers/api/relations_controller_test.rb index 7d011c17f..cdef1f5ba 100644 --- a/test/controllers/api/relations_controller_test.rb +++ b/test/controllers/api/relations_controller_test.rb @@ -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) diff --git a/test/factories/old_relation_member.rb b/test/factories/old_relation_member.rb index 99305cd98..34e0bd310 100644 --- a/test/factories/old_relation_member.rb +++ b/test/factories/old_relation_member.rb @@ -1,5 +1,6 @@ FactoryBot.define do factory :old_relation_member do + sequence(:sequence_id) member_role { "" } old_relation diff --git a/test/factories/relation_member.rb b/test/factories/relation_member.rb index bba2e7633..f8e14905e 100644 --- a/test/factories/relation_member.rb +++ b/test/factories/relation_member.rb @@ -1,5 +1,6 @@ FactoryBot.define do factory :relation_member do + sequence(:sequence_id) member_role { "" } relation