aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/mail_render_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-10-18 22:52:36 -0200
committerYehuda Katz <wycats@gmail.com>2009-11-01 02:23:48 +0100
commit43d5504f0a6a831474d149aa5f1ebb2545790152 (patch)
treeab3c28e28279c029784b5c3e129d0e3c0d8faa75 /actionmailer/test/mail_render_test.rb
parent684c2dc20801b7fcc941ec9478d33d3bf7c74551 (diff)
downloadrails-43d5504f0a6a831474d149aa5f1ebb2545790152.tar.gz
rails-43d5504f0a6a831474d149aa5f1ebb2545790152.tar.bz2
rails-43d5504f0a6a831474d149aa5f1ebb2545790152.zip
Move all render and layout pieces required in ActionMailer from ActionController to AbstractController.
Diffstat (limited to 'actionmailer/test/mail_render_test.rb')
-rw-r--r--actionmailer/test/mail_render_test.rb15
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