Bug with time zone when testing sending of brouillon expiration notices
This commit is contained in:
parent
9672d892e9
commit
a02a5edce3
1 changed files with 6 additions and 5 deletions
|
@ -1049,12 +1049,13 @@ describe Dossier do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#send_brouillon_expiration_notices' do
|
describe '#send_brouillon_expiration_notices' do
|
||||||
let!(:procedure) { create(:procedure, duree_conservation_dossiers_dans_ds: 6) }
|
before { Timecop.freeze(Time.zone.parse('12/12/2012 15:00:00')) }
|
||||||
let!(:date_close_to_expiration) { Date.today - procedure.duree_conservation_dossiers_dans_ds.months + 1.month }
|
|
||||||
let!(:date_expired) { Date.today - procedure.duree_conservation_dossiers_dans_ds.months - 6.days }
|
let!(:procedure) { create(:procedure, duree_conservation_dossiers_dans_ds: 6) }
|
||||||
let!(:date_not_expired) { Date.today - procedure.duree_conservation_dossiers_dans_ds.months + 2.months }
|
let!(:date_close_to_expiration) { Time.zone.now - procedure.duree_conservation_dossiers_dans_ds.months + 1.month }
|
||||||
|
let!(:date_expired) { Time.zone.now - procedure.duree_conservation_dossiers_dans_ds.months - 6.days }
|
||||||
|
let!(:date_not_expired) { Time.zone.now - procedure.duree_conservation_dossiers_dans_ds.months + 2.months }
|
||||||
|
|
||||||
before { Timecop.freeze(Time.zone.parse('12/12/2012').beginning_of_day) }
|
|
||||||
after { Timecop.return }
|
after { Timecop.return }
|
||||||
|
|
||||||
context "Envoi de message pour les dossiers expirant dans - d'un mois" do
|
context "Envoi de message pour les dossiers expirant dans - d'un mois" do
|
||||||
|
|
Loading…
Reference in a new issue