use traitement model

when a dossier is terminated (accepte, refuse or classe_sans_suite),
we store now `processed_at` and `motivation` in a traitement instance
This commit is contained in:
Christophe Robillard 2020-07-02 11:02:50 +02:00
parent f631acd118
commit a072d35211
14 changed files with 107 additions and 29 deletions

View file

@ -478,7 +478,7 @@ describe Instructeur, type: :model do
before do
procedure_to_assign.update(declarative_with_state: "accepte")
DeclarativeProceduresJob.new.perform
dossier.update(processed_at: Time.zone.yesterday.beginning_of_day)
dossier.traitements.last.update(processed_at: Time.zone.yesterday.beginning_of_day)
dossier.reload
end