Skip to content

Commit

Permalink
Fix date comparison in resource feature spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Mar 18, 2020
1 parent 61e47bb commit 89342cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/features/admin/resources_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89342cc

Please sign in to comment.