models: require belong_to associations on assign_to

This commit is contained in:
Pierre de La Morinerie 2020-07-20 14:13:51 +00:00
parent 11456109c0
commit c1e2928ce7
7 changed files with 25 additions and 25 deletions

View file

@ -1,6 +1,10 @@
FactoryBot.define do
factory :procedure_presentation do
assign_to { create(:assign_to, procedure: create(:procedure, :with_type_de_champ)) }
transient do
procedure { create(:procedure, :with_instructeur, :with_type_de_champ) }
end
assign_to { association :assign_to, procedure: procedure, instructeur: procedure.instructeurs.first }
sort { { "table" => "user", "column" => "email", "order" => "asc" } }
end
end