aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-11-18 22:01:33 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-11-18 22:01:33 +0000
commita76490d91758e775dc4facd8a3b577a60afc175e (patch)
tree90b610e47333e864d0f80e8f8ac7d7996ae610de /actionmailer/test
parent713ca5196d9bc2f005abedf6de416a8e717e41cc (diff)
downloadrails-a76490d91758e775dc4facd8a3b577a60afc175e.tar.gz
rails-a76490d91758e775dc4facd8a3b577a60afc175e.tar.bz2
rails-a76490d91758e775dc4facd8a3b577a60afc175e.zip
Fixed that partial rendering should look at the type of the first render to determine its own type if no other clues are available (like when using text.plain.erb as the extension in AM) (closes #10130) [java] Fixed that partials would be broken when using text.plain.erb as the extension #10130 [java]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rw-r--r--actionmailer/test/mail_render_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb
index d6ee21a8b9..0bd5eafd59 100644
--- a/actionmailer/test/mail_render_test.rb
+++ b/actionmailer/test/mail_render_test.rb
@@ -20,6 +20,12 @@ class RenderMailer < ActionMailer::Base
subject "rendering rxml template"
from "tester@example.com"
end
+
+ def included_subtemplate(recipient)
+ recipients recipient
+ subject "Including another template in the one being rendered"
+ from "tester@example.com"
+ end
def initialize_defaults(method_name)
super
@@ -70,6 +76,11 @@ class RenderHelperTest < Test::Unit::TestCase
mail = RenderMailer.deliver_rxml_template(@recipient)
assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test/>", mail.body.strip
end
+
+ def test_included_subtemplate
+ mail = RenderMailer.deliver_included_subtemplate(@recipient)
+ assert_equal "Hey Ho, let's go!", mail.body.strip
+ end
end
class FirstSecondHelperTest < Test::Unit::TestCase