Merge pull request #7331 from tchak/fix-expiration-test

fix(spec): try fix dossier expiration spec
This commit is contained in:
Paul Chavard 2022-05-17 10:24:29 +02:00 committed by GitHub
commit 688df8e59b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,9 @@ describe ExpiredDossiersDeletionService do
let(:reference_date) { Date.parse("March 8") }
describe '#process_expired_dossiers_brouillon' do
before { Timecop.freeze(reference_date) }
after { Timecop.return }
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_expired) { today - procedure.duree_conservation_dossiers_dans_ds.months - 6.days }