Skip to content

Commit 308d748

Browse files
yndajasmike3985
andcommitted
Don't create link_set for edition links in factory
We encountered an issue when creating an edition link separately to its edition (i.e. not using the `links_hash` transient/argument), whereby both a link set association was created even when explicitly creating an edition association Co-authored-by: Mike Patrick <mike.patrick2@digital.cabinet-office.gov.uk>
1 parent 11902d1 commit 308d748

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/factories/link.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FactoryBot.define do
22
factory :link do
3-
link_set
3+
link_set { create(:link_set) unless edition }
44
target_content_id { SecureRandom.uuid }
55
link_type { "organisations" }
66
end

0 commit comments

Comments
 (0)