Merge pull request #3531 from betagouv/frederic/fix_delai_instruction_test_after_february

Fix test for the 2 months following February
This commit is contained in:
Paul Chavard 2019-03-01 18:51:02 +01:00 committed by GitHub
commit 8fac9167ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,10 +30,14 @@ describe 'Dossier details:' do
let(:dossier) { create(:dossier, :en_instruction, :for_individual, :with_commentaires, user: user, procedure: procedure) } let(:dossier) { create(:dossier, :en_instruction, :for_individual, :with_commentaires, user: user, procedure: procedure) }
before do before do
other_dossier = create(:dossier, :accepte, :for_individual, procedure: procedure, en_instruction_at: 2.months.ago, processed_at: Time.zone.now) Timecop.freeze(Time.zone.local(2012, 12, 20))
other_dossier = create(:dossier, :accepte, :for_individual, procedure: procedure, en_instruction_at: 60.days.ago, processed_at: Time.zone.now)
visit dossier_path(dossier) visit dossier_path(dossier)
end end
after { Timecop.return }
it { expect(page).to have_text("Habituellement, les dossiers de cette démarche sont traités dans un délai de 2 mois.") } it { expect(page).to have_text("Habituellement, les dossiers de cette démarche sont traités dans un délai de 2 mois.") }
end end
end end