Update spec

Configure the database before starting the browser with a call to `visit`
This commit is contained in:
taitus
2023-05-24 09:21:36 +02:00
parent c52d28788a
commit 81b7f30c8a

View File

@@ -103,16 +103,21 @@ describe "Account" do
expect(find("#account_email_on_comment_reply")).to be_checked expect(find("#account_email_on_comment_reply")).to be_checked
end end
scenario "Email digest checkbox only appears if proposals are enabled" do describe "Email digest checkbox" do
scenario "Appears when the proposals process is enabled" do
visit account_path visit account_path
expect(page).to have_field "Receive a summary of proposal notifications", checked: true expect(page).to have_field "Receive a summary of proposal notifications", checked: true
end
scenario "Does not appear when the proposals process is disabled" do
Setting["process.proposals"] = false Setting["process.proposals"] = false
visit account_path visit account_path
expect(page).not_to have_field "Receive a summary of proposal notifications" expect(page).not_to have_field "Receive a summary of proposal notifications"
end end
end
context "Option to display badge for official position" do context "Option to display badge for official position" do
scenario "Users with official position of level 1" do scenario "Users with official position of level 1" do