change procedure_auto_archive helper name and added a helper for 23 h 59

This commit is contained in:
Judith 2020-05-27 18:04:22 +02:00 committed by GitHub Action
parent 6b65ee8d15
commit d930124839
6 changed files with 16 additions and 10 deletions

View file

@ -1,10 +1,10 @@
RSpec.describe ProcedureHelper, type: :helper do
let(:auto_archive_date) { Time.zone.local(2020, 8, 2, 12, 00) }
let(:procedure) { create(:procedure, auto_archive_on: auto_archive_date) }
let(:procedure) { build(:procedure, auto_archive_on: auto_archive_date) }
subject { show_auto_archive(procedure) }
subject { procedure_auto_archive_datetime(procedure) }
it "displays the day before the auto archive date (to account for the '23h59' ending time)" do
expect(subject).to eq "1 août 2020"
expect(subject).to have_text("1 août 2020 à 23 h 59 (heure de Paris)")
end
end