From 97fe4642320ffa88eca5bbabeb3eb534b655e1ae Mon Sep 17 00:00:00 2001 From: Bertocq Date: Thu, 14 Sep 2017 23:23:10 +0200 Subject: [PATCH] Use datetime always with zone --- spec/features/admin/poll/shifts_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/features/admin/poll/shifts_spec.rb b/spec/features/admin/poll/shifts_spec.rb index 65396267b..1e5bb6328 100644 --- a/spec/features/admin/poll/shifts_spec.rb +++ b/spec/features/admin/poll/shifts_spec.rb @@ -14,19 +14,19 @@ feature 'Admin shifts' do booth1 = create(:poll_booth) booth2 = create(:poll_booth) - shift1 = create(:poll_shift, officer: officer, booth: booth1, date: Date.today) - shift2 = create(:poll_shift, officer: officer, booth: booth2, date: Date.tomorrow) + shift1 = create(:poll_shift, officer: officer, booth: booth1, date: Time.zone.today) + shift2 = create(:poll_shift, officer: officer, booth: booth2, date: Time.zone.tomorrow) visit new_admin_booth_shift_path(booth1) expect(page).to have_css(".shift", count: 1) - expect(page).to have_content I18n.l(Date.today, format: :long) + expect(page).to have_content I18n.l(Time.zone.today, format: :long) expect(page).to have_content officer.name visit new_admin_booth_shift_path(booth2) expect(page).to have_css(".shift", count: 1) - expect(page).to have_content I18n.l(Date.tomorrow, format: :long) + expect(page).to have_content I18n.l(Time.zone.tomorrow, format: :long) expect(page).to have_content officer.name end