aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/mail_render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/mail_render_test.rb')
-rw-r--r--actionmailer/test/mail_render_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb
index 0bd5eafd59..475735e7b0 100644
--- a/actionmailer/test/mail_render_test.rb
+++ b/actionmailer/test/mail_render_test.rb
@@ -26,6 +26,13 @@ class RenderMailer < ActionMailer::Base
subject "Including another template in the one being rendered"
from "tester@example.com"
end
+
+ def included_old_subtemplate(recipient)
+ recipients recipient
+ subject "Including another template in the one being rendered"
+ from "tester@example.com"
+ body render(:inline => "Hello, <%= render \"subtemplate\" %>", :body => { :world => "Earth" })
+ end
def initialize_defaults(method_name)
super
@@ -81,6 +88,12 @@ class RenderHelperTest < Test::Unit::TestCase
mail = RenderMailer.deliver_included_subtemplate(@recipient)
assert_equal "Hey Ho, let's go!", mail.body.strip
end
+
+ def test_deprecated_old_subtemplate
+ assert_raises ActionView::ActionViewError do
+ RenderMailer.deliver_included_old_subtemplate(@recipient)
+ end
+ end
end
class FirstSecondHelperTest < Test::Unit::TestCase