aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/base_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-28 12:55:53 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-28 17:58:48 -0200
commit37586ddf279c46c3d0c8c2553d0918aa82ceb020 (patch)
tree007e6b8a334dfe24703491e8df635b5bd8114b23 /actionmailer/test/base_test.rb
parent2b5d3aa442625169125ff0be95fe30f7d462ea54 (diff)
downloadrails-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.rb6
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