summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-05-02 07:56:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-05-02 07:56:11 +0000
commit53deb6ca880df81a7dd741dab46a007455a472c2 (patch)
treec1b77a56bb11a35c5e4715c4c900ae9919ea3185 /test/unit
parent61776a8b7e60e2a794080b8d2b72c707086adfd8 (diff)
downloadredmine-53deb6ca880df81a7dd741dab46a007455a472c2.tar.gz
redmine-53deb6ca880df81a7dd741dab46a007455a472c2.zip
Mailer.token_for generates invalid message_id when using from address with full name (#16619).
git-svn-id: http://svn.redmine.org/redmine/trunk@13126 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/mailer_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index 8d661fc51..983e9fc4f 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -650,6 +650,12 @@ class MailerTest < ActiveSupport::TestCase
assert ActionMailer::Base.perform_deliveries
end
+ def test_token_for_should_strip_trailing_gt_from_address_with_full_name
+ with_settings :mail_from => "Redmine Mailer<no-reply@redmine.org>" do
+ assert_match /\Aredmine.issue-\d+\.\d+\.[0-9a-f]+@redmine.org\z/, Mailer.token_for(Issue.generate!)
+ end
+ end
+
def test_layout_should_include_the_emails_header
with_settings :emails_header => "*Header content*" do
with_settings :plain_text_mail => 0 do