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