diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
commit | 9887f238871bb2dd73de6ce8855615bcc5d8d079 (patch) | |
tree | 74fa9ff9524a51701cfa23f708b3f777c65b7fe5 /actionmailer/test/mail_helper_test.rb | |
parent | aff821508a16245ebc03510ba29c70379718dfb7 (diff) | |
parent | 5214e73850916de3c9127d35a4ecee0424d364a3 (diff) | |
download | rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.gz rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.bz2 rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.zip |
Merge branch 'master' of https://github.com/rails/rails
Diffstat (limited to 'actionmailer/test/mail_helper_test.rb')
-rw-r--r-- | actionmailer/test/mail_helper_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index 7cc0804323..17e9c82045 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -14,6 +14,14 @@ class HelperMailer < ActionMailer::Base end end + def use_format_paragraph + @text = "But soft! What light through yonder window breaks?" + + mail_with_defaults do |format| + format.html { render(:inline => "<%= format_paragraph @text, 15, 1 %>") } + end + end + def use_mailer mail_with_defaults do |format| format.html { render(:inline => "<%= mailer.message.subject %>") } @@ -50,5 +58,10 @@ class MailerHelperTest < ActionMailer::TestCase mail = HelperMailer.use_message assert_match "using helpers", mail.body.encoded end + + def test_use_format_paragraph + mail = HelperMailer.use_format_paragraph + assert_match " But soft! What\r\n light through\r\n yonder window\r\n breaks?", mail.body.encoded + end end |