mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
Merge pull request #2192 from jorgemanrubia/configurable-emails-prefix
Option to change the subject prefix in emails
This commit is contained in:
@ -145,10 +145,15 @@ describe Email::MessageBuilder do
|
||||
context "template_args" do
|
||||
let(:template_args) { builder.template_args }
|
||||
|
||||
it "has the site name" do
|
||||
it "has the site name as the site title when `SiteSetting.email_prefix` is not set" do
|
||||
expect(template_args[:site_name]).to eq(SiteSetting.title)
|
||||
end
|
||||
|
||||
it "has the site name as SiteSetting.email_prefix when it is set" do
|
||||
SiteSetting.email_prefix = 'some email prefix'
|
||||
expect(template_args[:site_name]).to eq(SiteSetting.email_prefix)
|
||||
end
|
||||
|
||||
it "has the base url" do
|
||||
expect(template_args[:base_url]).to eq(Discourse.base_url)
|
||||
end
|
||||
|
Reference in New Issue
Block a user