From 89342cc16295742a3a2fcb1ed507a33a1094ee74 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 18 Mar 2020 13:29:08 +0100 Subject: [PATCH] Fix date comparison in resource feature spec --- spec/features/admin/resources_integration_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/features/admin/resources_integration_spec.rb b/spec/features/admin/resources_integration_spec.rb index f22d72a2ee..fabb46dfe1 100644 --- a/spec/features/admin/resources_integration_spec.rb +++ b/spec/features/admin/resources_integration_spec.rb @@ -75,18 +75,19 @@ describe "create resource item" do context "when form filled with valid data" do let!(:location) { create(:location) } + let(:start_date) { 1.week.from_now } before do visit '/admin/events/new' fill_in 'event_name', with: 'My second event' - fill_in 'event_starts_at', with: Time.local(2012, 03, 03, 20, 00) + fill_in 'event_starts_at', with: start_date select location.name, from: 'Location' click_on 'Save' end it "lists the new item" do expect(page).to have_content "My second event" - expect(page).to have_content "03.12.2020" + expect(page).to have_content I18n.l(start_date, format: :'alchemy.default') end it "shows a success message" do