test(declarative): clarify intention with pending correction & declarative procedure

This commit is contained in:
Colin Darie 2023-12-11 13:10:25 +01:00
parent c26b59722d
commit 3d21262e89
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
2 changed files with 23 additions and 7 deletions

View file

@ -4,7 +4,7 @@ class ProcessStalledDeclarativeDossierJob < ApplicationJob
case dossier.procedure.declarative_with_state
when Procedure.declarative_with_states.fetch(:en_instruction)
if !dossier.en_instruction?
if !dossier.en_instruction? && dossier.may_passer_automatiquement_en_instruction?
dossier.passer_automatiquement_en_instruction!
end
when Procedure.declarative_with_states.fetch(:accepte)