feat: batch action for repousser_expiration depuis expirant
This commit is contained in:
parent
9031de803b
commit
8c1bc9e62f
9 changed files with 125 additions and 4 deletions
|
@ -59,6 +59,19 @@ describe BatchOperationProcessOneJob, type: :job do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when operation is "repousser_expiration"' do
|
||||
let(:batch_operation) do
|
||||
create(:batch_operation, :repousser_expiration,
|
||||
options.merge(instructeur: create(:instructeur)))
|
||||
end
|
||||
it 'archives the dossier in the batch' do
|
||||
expect { subject.perform_now }
|
||||
.to change { dossier_job.reload.conservation_extension }
|
||||
.from(dossier_job.conservation_extension)
|
||||
.to(dossier_job.conservation_extension + 1.month)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when operation is "follow"' do
|
||||
let(:batch_operation) do
|
||||
create(:batch_operation, :follow,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue