diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-28 12:55:53 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-28 17:58:48 -0200 |
commit | 37586ddf279c46c3d0c8c2553d0918aa82ceb020 (patch) | |
tree | 007e6b8a334dfe24703491e8df635b5bd8114b23 /actionmailer/test/base_test.rb | |
parent | 2b5d3aa442625169125ff0be95fe30f7d462ea54 (diff) | |
download | rails-37586ddf279c46c3d0c8c2553d0918aa82ceb020.tar.gz rails-37586ddf279c46c3d0c8c2553d0918aa82ceb020.tar.bz2 rails-37586ddf279c46c3d0c8c2553d0918aa82ceb020.zip |
Merge pull request #8048 from senny/7761_dont_render_view_without_mail_call
Do not render views when mail() isn't called. (NullMail refactoring)
Conflicts:
actionmailer/CHANGELOG.md
Diffstat (limited to 'actionmailer/test/base_test.rb')
-rw-r--r-- | actionmailer/test/base_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index d92fc01ef8..b69b26faf0 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -471,6 +471,12 @@ class BaseTest < ActiveSupport::TestCase assert_equal(%{<img alt="Dummy" src="http://local.com/images/dummy.png" />}, mail.body.to_s.strip) end + test 'the view is not rendered when mail was never called' do + mail = BaseMailer.without_mail_call + assert_equal('', mail.body.to_s.strip) + mail.deliver + end + # Before and After hooks class MyObserver |