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:
Javi Martín
2022-09-16 16:50:15 +02:00
parent b41fbfa52d
commit a774456b51

View File

@@ -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"