From ee3f0454951ece06fe3466a4c12bb78302e67a0f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 10 Oct 2023 21:35:00 +0100 Subject: [PATCH] Assign proper sequence numbers to relation members in tests --- test/controllers/api/relations_controller_test.rb | 6 +++--- test/factories/old_relation_member.rb | 1 + test/factories/relation_member.rb | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.5