add bulk action 'follow'
This commit is contained in:
parent
177dec2bdb
commit
25a7fa5a34
10 changed files with 126 additions and 5 deletions
|
@ -39,5 +39,16 @@ FactoryBot.define do
|
|||
]
|
||||
end
|
||||
end
|
||||
|
||||
trait :follow do
|
||||
operation { BatchOperation.operations.fetch(:follow) }
|
||||
after(:build) do |batch_operation, evaluator|
|
||||
procedure = create(:simple_procedure, :published, instructeurs: [evaluator.invalid_instructeur.presence || batch_operation.instructeur], administrateurs: [create(:administrateur)])
|
||||
batch_operation.dossiers = [
|
||||
create(:dossier, :with_individual, :en_instruction, procedure: procedure),
|
||||
create(:dossier, :with_individual, :en_construction, procedure: procedure)
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue