diff options
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/mail_render_test.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb index 45811612eb..3f66fb1e43 100644 --- a/actionmailer/test/mail_render_test.rb +++ b/actionmailer/test/mail_render_test.rb @@ -12,7 +12,15 @@ class RenderMailer < ActionMailer::Base recipients recipient subject "using helpers" from "tester@example.com" - body render(:file => "signed_up", :body => { :recipient => recipient }) + body render(:file => "templates/signed_up", :body => { :recipient => recipient }) + end + + def implicit_body(recipient) + recipients recipient + subject "using helpers" + from "tester@example.com" + + render(:template => "templates/signed_up", :body => { :recipient => recipient }) end def rxml_template(recipient) @@ -69,6 +77,11 @@ class RenderHelperTest < Test::Unit::TestCase restore_delivery_method end + def test_implicit_body + mail = RenderMailer.create_implicit_body(@recipient) + assert_equal "Hello there, \n\nMr. test@localhost", mail.body.strip + end + def test_inline_template mail = RenderMailer.create_inline_template(@recipient) assert_equal "Hello, Earth", mail.body.strip |