Merge pull request #5113 from consul/proposals_notifications
Show email digest only if proposals are enabled
This commit is contained in:
@@ -54,9 +54,11 @@
|
|||||||
<%= f.check_box :newsletter %>
|
<%= f.check_box :newsletter %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<% if feature?(:proposals) %>
|
||||||
<%= f.check_box :email_digest %>
|
<div>
|
||||||
</div>
|
<%= f.check_box :email_digest %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<%= f.check_box :email_on_direct_message %>
|
<%= f.check_box :email_on_direct_message %>
|
||||||
|
|||||||
@@ -103,6 +103,17 @@ 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
|
||||||
|
visit account_path
|
||||||
|
|
||||||
|
expect(page).to have_field "Receive a summary of proposal notifications", checked: true
|
||||||
|
|
||||||
|
Setting["process.proposals"] = false
|
||||||
|
visit account_path
|
||||||
|
|
||||||
|
expect(page).not_to have_field "Receive a summary of proposal notifications"
|
||||||
|
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
|
||||||
official_user = create(:user, official_level: 1)
|
official_user = create(:user, official_level: 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user