Add a missing feature test for the linked dossier feature
This commit is contained in:
parent
b34bf4846c
commit
2b23d0d087
4 changed files with 35 additions and 5 deletions
|
@ -55,6 +55,17 @@ FactoryGirl.define do
|
|||
archived false
|
||||
end
|
||||
|
||||
trait :with_dossier_link do
|
||||
after(:create) do |dossier, _evaluator|
|
||||
linked_dossier = create(:dossier)
|
||||
type_de_champ = dossier.procedure.types_de_champ.find { |t| t.type_champ == 'dossier_link' }
|
||||
champ = dossier.champs.find { |c| c.type_de_champ == type_de_champ }
|
||||
|
||||
champ.value = linked_dossier.id
|
||||
champ.save!
|
||||
end
|
||||
end
|
||||
|
||||
trait :replied do
|
||||
state 'replied'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue