fix(spec): try fix dossier expiration spec

This commit is contained in:
Paul Chavard 2022-05-17 10:14:43 +02:00
parent b5871f72b0
commit 6909337500

View file

@ -8,6 +8,9 @@ describe ExpiredDossiersDeletionService do
let(:reference_date) { Date.parse("March 8") } let(:reference_date) { Date.parse("March 8") }
describe '#process_expired_dossiers_brouillon' do describe '#process_expired_dossiers_brouillon' do
before { Timecop.freeze(reference_date) }
after { Timecop.return }
let(:today) { Time.zone.now.at_beginning_of_day } let(:today) { Time.zone.now.at_beginning_of_day }
let(:date_close_to_expiration) { today - procedure.duree_conservation_dossiers_dans_ds.months + 13.days } let(:date_close_to_expiration) { today - procedure.duree_conservation_dossiers_dans_ds.months + 13.days }
let(:date_expired) { today - procedure.duree_conservation_dossiers_dans_ds.months - 6.days } let(:date_expired) { today - procedure.duree_conservation_dossiers_dans_ds.months - 6.days }