summaryrefslogtreecommitdiffstats
path: root/test/unit/mailer_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-02-16 22:45:34 +0000
committerGo MAEDA <maeda@farend.jp>2019-02-16 22:45:34 +0000
commit675b0c641df7fb47b6f26eb44877e511e8e97718 (patch)
treeab16bb723f374492723261f4dfff9fd136f73346 /test/unit/mailer_test.rb
parent21e503fc7100049131c41d27a33ec62094135263 (diff)
downloadredmine-675b0c641df7fb47b6f26eb44877e511e8e97718.tar.gz
redmine-675b0c641df7fb47b6f26eb44877e511e8e97718.zip
Test that List-Id header field does not include display name and extra angle brackets (#14792).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17873 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r--test/unit/mailer_test.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index f22f532f4..7af853b67 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -198,11 +198,14 @@ class MailerTest < ActiveSupport::TestCase
end
def test_email_headers
- issue = Issue.find(1)
- Mailer.deliver_issue_add(issue)
+ with_settings :mail_from => 'Redmine <redmine@example.net>' do
+ issue = Issue.find(1)
+ Mailer.deliver_issue_add(issue)
+ end
mail = last_email
assert_equal 'All', mail.header['X-Auto-Response-Suppress'].to_s
assert_equal 'auto-generated', mail.header['Auto-Submitted'].to_s
+ # List-Id should not include the display name "Redmine"
assert_equal '<redmine.example.net>', mail.header['List-Id'].to_s
end