feat: batch action for desarchiver
This commit is contained in:
parent
c0c2e35881
commit
5c80f6c3f0
9 changed files with 117 additions and 2 deletions
|
@ -18,6 +18,18 @@ FactoryBot.define do
|
|||
end
|
||||
end
|
||||
|
||||
trait :desarchiver do
|
||||
operation { BatchOperation.operations.fetch(:desarchiver) }
|
||||
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, :accepte, procedure: procedure, archived: true),
|
||||
create(:dossier, :with_individual, :refuse, procedure: procedure, archived: true),
|
||||
create(:dossier, :with_individual, :sans_suite, procedure: procedure, archived: true)
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
trait :passer_en_instruction do
|
||||
operation { BatchOperation.operations.fetch(:passer_en_instruction) }
|
||||
after(:build) do |batch_operation, evaluator|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue