diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-09-29 22:29:29 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2012-10-28 20:45:43 +0100 |
commit | b786f065d3fc6b0869f7f485042e8667e71ff66d (patch) | |
tree | 703e918d99de02f946898f019a74c1be5eff359e /actionmailer/test/base_test.rb | |
parent | 2e44dda27ae8df9301b1a83bfaa74708678bfcd4 (diff) | |
download | rails-b786f065d3fc6b0869f7f485042e8667e71ff66d.tar.gz rails-b786f065d3fc6b0869f7f485042e8667e71ff66d.tar.bz2 rails-b786f065d3fc6b0869f7f485042e8667e71ff66d.zip |
Do not render views when mail() isn't called. (NullMail refactoring)
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 1cb3ce63fe..b30ec2ddc9 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -499,6 +499,12 @@ class BaseTest < ActiveSupport::TestCase end 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 |