cb890343ff
feat(user.merge): ensure to merge user.targeted_user_link Update app/models/targeted_user_link.rb Co-authored-by: LeSim <mail@simon.lehericey.net> Update app/models/targeted_user_link.rb Co-authored-by: LeSim <mail@simon.lehericey.net> Update app/models/targeted_user_link.rb Co-authored-by: LeSim <mail@simon.lehericey.net> feat(db/create_targeted_user_links): ensure not null with fk
12 lines
327 B
Ruby
12 lines
327 B
Ruby
FactoryBot.define do
|
|
factory :targeted_user_link do
|
|
target_context { TargetedUserLink.target_contexts[:avis] }
|
|
target_model { create(:avis) }
|
|
transient do
|
|
user {}
|
|
end
|
|
after(:build) do |targeted_user_link|
|
|
targeted_user_link.user = targeted_user_link.target_model.expert.user
|
|
end
|
|
end
|
|
end
|