]> source.dussan.org Git - redmine.git/commitdiff
Adds a test for emission address with phrase (#4855).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 17 Feb 2010 19:08:04 +0000 (19:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 17 Feb 2010 19:08:04 +0000 (19:08 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3443 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/mailer_test.rb

index 936be76c53c909d7ffc58baa75fdad276b8a2120..badd9cb21d90944cf0c1d8db837bb8310d286f9b 100644 (file)
@@ -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