diff options
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/old_base/mail_render_test.rb | 10 | ||||
-rw-r--r-- | actionmailer/test/old_base/mail_service_test.rb | 110 |
2 files changed, 1 insertions, 119 deletions
diff --git a/actionmailer/test/old_base/mail_render_test.rb b/actionmailer/test/old_base/mail_render_test.rb index bf489e77d4..9b1455da33 100644 --- a/actionmailer/test/old_base/mail_render_test.rb +++ b/actionmailer/test/old_base/mail_render_test.rb @@ -129,16 +129,6 @@ class RenderHelperTest < Test::Unit::TestCase 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 diff --git a/actionmailer/test/old_base/mail_service_test.rb b/actionmailer/test/old_base/mail_service_test.rb index a216b94a55..49647c9612 100644 --- a/actionmailer/test/old_base/mail_service_test.rb +++ b/actionmailer/test/old_base/mail_service_test.rb @@ -1095,112 +1095,4 @@ EOF ensure TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) end -end - -class InheritableTemplateRootTest < ActiveSupport::TestCase - def test_attr - expected = File.expand_path("#{File.dirname(__FILE__)}/../fixtures/path.with.dots") - assert_equal expected, FunkyPathMailer.template_root.to_s - - sub = Class.new(FunkyPathMailer) - assert_deprecated do - sub.template_root = 'test/path' - end - - assert_equal File.expand_path('test/path'), sub.template_root.to_s - assert_equal expected, FunkyPathMailer.template_root.to_s - end -end - -class MethodNamingTest < ActiveSupport::TestCase - include ActionMailer::TestHelper - - class TestMailer < ActionMailer::Base - def send - body 'foo' - end - end - - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - end - - def teardown - restore_delivery_method - end - - def test_send_method - assert_nothing_raised do - assert_emails 1 do - assert_deprecated do - TestMailer.deliver_send - end - end - end - end -end -class RespondToTest < Test::Unit::TestCase - class RespondToMailer < ActionMailer::Base; end - - def setup - set_delivery_method :test - end - - def teardown - restore_delivery_method - end - - def test_should_respond_to_new - assert_respond_to RespondToMailer, :new - end - - def test_should_respond_to_create_with_template_suffix - assert_respond_to RespondToMailer, :create_any_old_template - end - - def test_should_respond_to_deliver_with_template_suffix - assert_respond_to RespondToMailer, :deliver_any_old_template - end - - def test_should_not_respond_to_new_with_template_suffix - assert !RespondToMailer.respond_to?(:new_any_old_template) - end - - def test_should_not_respond_to_create_with_template_suffix_unless_it_is_separated_by_an_underscore - assert !RespondToMailer.respond_to?(:createany_old_template) - end - - def test_should_not_respond_to_deliver_with_template_suffix_unless_it_is_separated_by_an_underscore - assert !RespondToMailer.respond_to?(:deliverany_old_template) - end - - def test_should_not_respond_to_create_with_template_suffix_if_it_begins_with_a_uppercase_letter - assert !RespondToMailer.respond_to?(:create_Any_old_template) - end - - def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_uppercase_letter - assert !RespondToMailer.respond_to?(:deliver_Any_old_template) - end - - def test_should_not_respond_to_create_with_template_suffix_if_it_begins_with_a_digit - assert !RespondToMailer.respond_to?(:create_1_template) - end - - def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_digit - assert !RespondToMailer.respond_to?(:deliver_1_template) - end - - def test_should_not_respond_to_method_where_deliver_is_not_a_suffix - assert !RespondToMailer.respond_to?(:foo_deliver_template) - end - - def test_should_still_raise_exception_with_expected_message_when_calling_an_undefined_method - error = assert_raise NoMethodError do - RespondToMailer.not_a_method - end - - assert_match(/method.*not_a_method/, error.message) - end -end +end
\ No newline at end of file |