diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-17 19:08:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-17 19:08:04 +0000 |
commit | b733accfe336e7870a9d420584bf1c11e5778b49 (patch) | |
tree | 88e608db686f292bd57d5bd1cfb2928f6de0f7e6 /test/unit/mailer_test.rb | |
parent | 3dd9687d4151b364569990a3b134ed112b8d2593 (diff) | |
download | redmine-b733accfe336e7870a9d420584bf1c11e5778b49.tar.gz redmine-b733accfe336e7870a9d420584bf1c11e5778b49.zip |
Adds a test for emission address with phrase (#4855).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3443 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 936be76c5..badd9cb21 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -123,6 +123,16 @@ class MailerTest < ActiveSupport::TestCase assert_equal 2, mail.parts.size assert mail.encoded.include?('href') end + + def test_mail_from_with_phrase + ActionMailer::Base.deliveries.clear + with_settings :mail_from => 'Redmine app <redmine@example.net>' do + Mailer.deliver_test(User.find(1)) + end + mail = ActionMailer::Base.deliveries.last + assert_not_nil mail + assert_equal 'Redmine app', mail.from_addrs.first.name + end def test_issue_add_message_id ActionMailer::Base.deliveries.clear |