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

@ -66,7 +66,7 @@ describe NotificationService do
before do
procedure.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