mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
Don't use unnecessary stubs; site setting language update
This commit is contained in:
parent
54b4fb69db
commit
2f00e2179f
2 changed files with 4 additions and 4 deletions
|
@ -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."
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue