Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix date comparison in resource feature spec #1750

Merged
merged 1 commit into from
Mar 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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