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

@@ -929,12 +929,9 @@ describe "Proposals" do
expect(page).not_to have_css(".recommendation", count: 3)
expect(page).to have_content("Recommendations for proposals are now disabled for this account")
user.reload
visit account_path
expect(find("#account_recommended_proposals")).not_to be_checked
expect(user.recommended_proposals).to be(false)
end
end
end