Merge pull request #6769 from betagouv/fix-tests
This commit is contained in:
commit
9944f1ba2d
1 changed files with 4 additions and 4 deletions
|
@ -8,10 +8,10 @@ describe ExpiredDossiersDeletionService do
|
|||
let(:reference_date) { Date.parse("March 8") }
|
||||
|
||||
describe '#process_expired_dossiers_brouillon' do
|
||||
let(:today) { Time.zone.now.at_midnight }
|
||||
let(:date_close_to_expiration) { Date.today - procedure.duree_conservation_dossiers_dans_ds.months + 2.weeks }
|
||||
let(:date_expired) { Date.today - procedure.duree_conservation_dossiers_dans_ds.months - 6.days }
|
||||
let(:date_not_expired) { Date.today - procedure.duree_conservation_dossiers_dans_ds.months + 2.months }
|
||||
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 }
|
||||
let(:date_not_expired) { today - procedure.duree_conservation_dossiers_dans_ds.months + 2.months }
|
||||
|
||||
context 'send messages for dossiers expiring soon and delete expired' do
|
||||
let!(:expired_brouillon) { create(:dossier, procedure: procedure, created_at: date_expired, brouillon_close_to_expiration_notice_sent_at: today - (warning_period + 3.days)) }
|
||||
|
|
Loading…
Reference in a new issue