Simplify test to edit a poll
Instead of having to add `beginning_of_minute` to deal with an issue
with Capybara filling datetime fields as mentioned in commit 5a0fde4048,
we can travel to the beginning of the minute so we don't have to take
the seconds into account.
This commit is contained in:
@@ -75,8 +75,8 @@ describe "Admin polls", :admin do
|
||||
end
|
||||
|
||||
scenario "Edit" do
|
||||
travel_to(Time.zone.local(2015, 7, 15, 13, 32, 13))
|
||||
poll = create(:poll, :with_image, ends_at: 1.month.from_now.beginning_of_minute)
|
||||
travel_to(Time.zone.local(2015, 7, 15, 13, 32, 00))
|
||||
poll = create(:poll, :with_image, ends_at: 1.month.from_now)
|
||||
|
||||
visit admin_poll_path(poll)
|
||||
click_link "Edit poll"
|
||||
|
||||
Reference in New Issue
Block a user