diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 2cd7f6e473a..1cf86ceafcb 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1248,7 +1248,7 @@ en: default_email_private_messages: "Send an email when someone messages the user by default." default_email_direct: "Send an email when someone quotes/replies to/mentions or invites the user by default." default_email_mailing_list_mode: "Send an email for every new post by default." - disable_mailing_list_mode: "Disable sending an email for every new post for all users" + disable_mailing_list_mode: "Disallow users from enabling mailing list mode." default_email_always: "Send an email notification even when the user is active by default." default_email_previous_replies: "Include previous replies in emails by default." diff --git a/spec/models/user_option_spec.rb b/spec/models/user_option_spec.rb index b388cd8d68b..50cfd6623d8 100644 --- a/spec/models/user_option_spec.rb +++ b/spec/models/user_option_spec.rb @@ -18,7 +18,7 @@ describe UserOption do end - describe ".mailing_list_mode" do + describe "#mailing_list_mode" do let!(:forum_user) { Fabricate(:user) } let!(:mailing_list_user) { Fabricate(:user) } @@ -28,13 +28,13 @@ describe UserOption do end it "should return false when `SiteSetting.disable_mailing_list_mode` is enabled" do - SiteSetting.expects(:disable_mailing_list_mode).twice.returns(true) + SiteSetting.disable_mailing_list_mode = true expect(forum_user.user_option.mailing_list_mode).to eq(false) expect(mailing_list_user.user_option.mailing_list_mode).to eq(false) end it "should return the stored value when `SiteSetting.disable_mailing_list_mode` is disabled" do - SiteSetting.expects(:disable_mailing_list_mode).twice.returns(false) + SiteSetting.disable_mailing_list_mode = false expect(forum_user.user_option.mailing_list_mode).to eq(false) expect(mailing_list_user.user_option.mailing_list_mode).to eq(true) end