aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/old_base/mail_render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/old_base/mail_render_test.rb')
-rw-r--r--actionmailer/test/old_base/mail_render_test.rb41
1 files changed, 4 insertions, 37 deletions
diff --git a/actionmailer/test/old_base/mail_render_test.rb b/actionmailer/test/old_base/mail_render_test.rb
index bf489e77d4..3a1d3184f4 100644
--- a/actionmailer/test/old_base/mail_render_test.rb
+++ b/actionmailer/test/old_base/mail_render_test.rb
@@ -19,18 +19,6 @@ class RenderMailer < ActionMailer::Base
body render(:file => "templates/signed_up")
end
- def rxml_template
- recipients 'test@localhost'
- subject "rendering rxml template"
- from "tester@example.com"
- end
-
- def included_subtemplate
- recipients 'test@localhost'
- subject "Including another template in the one being rendered"
- from "tester@example.com"
- end
-
def no_instance_variable
recipients 'test@localhost'
subject "No Instance Variable"
@@ -41,11 +29,6 @@ class RenderMailer < ActionMailer::Base
end
end
- def initialize_defaults(method_name)
- super
- mailer_name "test_mailer"
- end
-
def multipart_alternative
recipients 'test@localhost'
subject 'multipart/alternative'
@@ -97,11 +80,13 @@ class RenderHelperTest < Test::Unit::TestCase
set_delivery_method :test
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.deliveries.clear
+ ActiveSupport::Deprecation.silenced = true
@recipient = 'test@localhost'
end
def teardown
+ ActiveSupport::Deprecation.silenced = false
restore_delivery_method
end
@@ -115,35 +100,16 @@ class RenderHelperTest < Test::Unit::TestCase
assert_equal "Hello there,\n\nMr. test@localhost", mail.body.to_s.strip
end
- def test_rxml_template
- mail = RenderMailer.rxml_template.deliver
- assert_equal %(<?xml version="1.0" encoding="UTF-8"?>\n<test/>), mail.body.to_s.strip
- end
-
- def test_included_subtemplate
- mail = RenderMailer.included_subtemplate.deliver
- assert_equal "Hey Ho, let's go!", mail.body.to_s.strip
- end
-
def test_no_instance_variable
mail = RenderMailer.no_instance_variable.deliver
assert_equal "Look, subject.nil? is true!", mail.body.to_s.strip
end
-
- def test_legacy_multipart_alternative
- mail = RenderMailer.multipart_alternative.deliver
- assert_equal(2, mail.parts.size)
- assert_equal("multipart/alternative", mail.mime_type)
- assert_equal("text/plain", mail.parts[0].mime_type)
- assert_equal("foo: bar", mail.parts[0].body.encoded)
- assert_equal("text/html", mail.parts[1].mime_type)
- assert_equal("<strong>foo</strong> bar", mail.parts[1].body.encoded)
- end
end
class FirstSecondHelperTest < Test::Unit::TestCase
def setup
set_delivery_method :test
+ ActiveSupport::Deprecation.silenced = true
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.deliveries.clear
@@ -151,6 +117,7 @@ class FirstSecondHelperTest < Test::Unit::TestCase
end
def teardown
+ ActiveSupport::Deprecation.silenced = false
restore_delivery_method
end