diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-11-26 03:36:28 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-11-26 03:36:28 +0000 |
commit | bd5ed651105663cb4bc5acd86ad8bdf48251d0fe (patch) | |
tree | 3b444c65eafb90a535d8baa76766096a4192c738 /actionmailer/test | |
parent | 3d67860cae0898b248381075d98736ff77d671dd (diff) | |
download | rails-bd5ed651105663cb4bc5acd86ad8bdf48251d0fe.tar.gz rails-bd5ed651105663cb4bc5acd86ad8bdf48251d0fe.tar.bz2 rails-bd5ed651105663cb4bc5acd86ad8bdf48251d0fe.zip |
Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb (renamed from actionmailer/test/fixtures/test_mailer/subtemplate.text.plain.erb) | 0 | ||||
-rw-r--r-- | actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb | 2 | ||||
-rw-r--r-- | actionmailer/test/mail_render_test.rb | 13 |
3 files changed, 14 insertions, 1 deletions
diff --git a/actionmailer/test/fixtures/test_mailer/subtemplate.text.plain.erb b/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb index 3b4ba35f20..3b4ba35f20 100644 --- a/actionmailer/test/fixtures/test_mailer/subtemplate.text.plain.erb +++ b/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb diff --git a/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb b/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb index de9b2039fa..a93c30ea1a 100644 --- a/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +++ b/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb @@ -1 +1 @@ -Hey Ho, <%= render "subtemplate" %>
\ No newline at end of file +Hey Ho, <%= render :partial => "subtemplate" %>
\ No newline at end of file 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 |