specs: fix #usual_traitement_time tests when near the DST date

This commit is contained in:
Pierre de La Morinerie 2019-11-04 10:56:15 +01:00
parent 2e8d365b93
commit a458693a19

View file

@ -814,11 +814,15 @@ describe Procedure do
end end
before do before do
Timecop.freeze(Time.utc(2019, 6, 1, 12, 0))
delays.each do |delay| delays.each do |delay|
create_dossier(construction_date: 1.week.ago - delay, instruction_date: 1.week.ago - delay + 12.hours, processed_date: 1.week.ago) create_dossier(construction_date: 1.week.ago - delay, instruction_date: 1.week.ago - delay + 12.hours, processed_date: 1.week.ago)
end end
end end
after { Timecop.return }
context 'when there are several processed dossiers' do context 'when there are several processed dossiers' do
let(:delays) { [1.day, 2.days, 2.days, 2.days, 2.days, 3.days, 3.days, 3.days, 3.days, 12.days] } let(:delays) { [1.day, 2.days, 2.days, 2.days, 2.days, 3.days, 3.days, 3.days, 3.days, 12.days] }