Remove redundant database checks in system tests

These tests check what happens from the user's point of view. For
instance, we check that after disabling recommendations, they are not
shown. What happens in the database is not related to the user
experience.

Furthermore, checking the database after the browser has started is
proving to be a major source for inconsistent data in specs.
This commit is contained in:
Javi Martín
2021-04-10 14:27:31 +02:00
parent 747da42972
commit 907c0fc679
11 changed files with 3 additions and 30 deletions

View File

@@ -80,7 +80,6 @@ describe "Admin proposals", :admin do
expect(page).to have_content "Proposal updated successfully"
expect(find_field("Mark as selected")).to be_checked
expect(proposal.reload.selected?).to be true
end
scenario "Unselect a proposal" do
@@ -93,7 +92,6 @@ describe "Admin proposals", :admin do
expect(page).to have_content "Proposal updated successfully"
expect(find_field("Mark as selected")).not_to be_checked
expect(proposal.reload.selected?).to be false
end
end
end