From 43d5504f0a6a831474d149aa5f1ebb2545790152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 18 Oct 2009 22:52:36 -0200 Subject: Move all render and layout pieces required in ActionMailer from ActionController to AbstractController. --- actionmailer/test/mail_render_test.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'actionmailer/test') 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 -- cgit v1.2.3