Iterate over type_de_champ in repetition type_de_champ
This commit is contained in:
parent
a62e9fe6d2
commit
4f317e84d1
3 changed files with 28 additions and 0 deletions
|
@ -153,6 +153,15 @@ FactoryBot.define do
|
|||
end
|
||||
end
|
||||
|
||||
trait :with_repetition do
|
||||
after(:build) do |procedure, _evaluator|
|
||||
type_de_champ = create(:type_de_champ_repetition)
|
||||
procedure.types_de_champ << type_de_champ
|
||||
|
||||
type_de_champ.types_de_champ << create(:type_de_champ, libelle: 'sub type de champ')
|
||||
end
|
||||
end
|
||||
|
||||
trait :published do
|
||||
after(:build) do |procedure, _evaluator|
|
||||
procedure.path = generate(:published_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue