From 0dded3fa22c46b4b3eebd820426a33c0bc97ac4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 2 Jun 2022 18:59:13 +0200 Subject: [PATCH] Remove redundant expectations in polls tests Furthermore, using `Poll.all` results in a database query, and doing so after the process running the browser has started might result in failures when running our test suite. --- spec/system/admin/poll/polls_spec.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/spec/system/admin/poll/polls_spec.rb b/spec/system/admin/poll/polls_spec.rb index dc3b090aa..afeaaf8da 100644 --- a/spec/system/admin/poll/polls_spec.rb +++ b/spec/system/admin/poll/polls_spec.rb @@ -21,13 +21,6 @@ describe "Admin polls", :admin do expect(page).to have_content "List of polls" expect(page).to have_css ".poll", count: 3 - polls = Poll.all - polls.each do |poll| - within("#poll_#{poll.id}") do - expect(page).to have_content poll.name - end - end - expect(poll_3.name).to appear_before(poll_1.name) expect(poll_1.name).to appear_before(poll_2.name) expect(page).not_to have_content "There are no polls"