@@ -157,12 +157,22 class MailerTest < ActiveSupport::TestCase | |||
|
157 | 157 | assert mail.encoded.include?('href') |
|
158 | 158 | end |
|
159 | 159 | |
|
160 |
def test_ |
|
|
160 | def test_from_header | |
|
161 | with_settings :mail_from => 'redmine@example.net' do | |
|
162 | Mailer.deliver_test(User.find(1)) | |
|
163 | end | |
|
164 | mail = ActionMailer::Base.deliveries.last | |
|
165 | assert_not_nil mail | |
|
166 | assert_equal 'redmine@example.net', mail.from_addrs.first.address | |
|
167 | end | |
|
168 | ||
|
169 | def test_from_header_with_phrase | |
|
161 | 170 | with_settings :mail_from => 'Redmine app <redmine@example.net>' do |
|
162 | 171 | Mailer.deliver_test(User.find(1)) |
|
163 | 172 | end |
|
164 | 173 | mail = ActionMailer::Base.deliveries.last |
|
165 | 174 | assert_not_nil mail |
|
175 | assert_equal 'redmine@example.net', mail.from_addrs.first.address | |
|
166 | 176 | assert_equal 'Redmine app', mail.from_addrs.first.name |
|
167 | 177 | end |
|
168 | 178 |
General Comments 0
You need to be logged in to leave comments.
Login now