aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-15 20:30:48 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-15 20:30:48 +0000
commitcf2ee1451baca9c1c1ec00f221ce5a2fbefaa41f (patch)
tree9a2d8b18dead54cd0849b8b9b2609805800c6a47 /actionmailer/test
parentea1eafb6b10dc4c392b18b0990111d48e74e7ba5 (diff)
downloadrails-cf2ee1451baca9c1c1ec00f221ce5a2fbefaa41f.tar.gz
rails-cf2ee1451baca9c1c1ec00f221ce5a2fbefaa41f.tar.bz2
rails-cf2ee1451baca9c1c1ec00f221ce5a2fbefaa41f.zip
Fix silent failure of rxml templates. Closes #9879.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7921 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 42454fef6e..a725dac4ca 100644
--- a/actionmailer/test/mail_render_test.rb
+++ b/actionmailer/test/mail_render_test.rb
@@ -15,6 +15,12 @@ class RenderMailer < ActionMailer::Base
body render(:file => "signed_up", :body => { :recipient => recipient })
end
+ def rxml_template(recipient)
+ recipients recipient
+ subject "rendering rxml template"
+ from "tester@example.com"
+ end
+
def initialize_defaults(method_name)
super
mailer_name "test_mailer"
@@ -55,6 +61,11 @@ class RenderHelperTest < Test::Unit::TestCase
mail = RenderMailer.create_file_template(@recipient)
assert_equal "Hello there, \n\nMr. test@localhost", mail.body.strip
end
+
+ def test_rxml_template
+ mail = RenderMailer.deliver_rxml_template(@recipient)
+ assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test/>", mail.body.strip
+ end
end
class FirstSecondHelperTest < Test::Unit::TestCase