mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
1ad87adc9f
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
51 lines
1 KiB
Ruby
51 lines
1 KiB
Ruby
require 'abstract_unit'
|
|
|
|
class DefaultDeliveryMethodMailer < ActionMailer::Base
|
|
end
|
|
|
|
class NonDefaultDeliveryMethodMailer < ActionMailer::Base
|
|
self.delivery_method = :sendmail
|
|
end
|
|
|
|
class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase
|
|
def setup
|
|
set_delivery_method :smtp
|
|
end
|
|
|
|
def teardown
|
|
restore_delivery_method
|
|
end
|
|
|
|
def test_should_be_the_default_smtp
|
|
assert_equal :smtp, ActionMailer::Base.delivery_method
|
|
end
|
|
end
|
|
|
|
class DefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
|
|
def setup
|
|
set_delivery_method :smtp
|
|
end
|
|
|
|
def teardown
|
|
restore_delivery_method
|
|
end
|
|
|
|
def test_should_be_the_default_smtp
|
|
assert_equal :smtp, DefaultDeliveryMethodMailer.delivery_method
|
|
end
|
|
end
|
|
|
|
class NonDefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
|
|
def setup
|
|
set_delivery_method :smtp
|
|
end
|
|
|
|
def teardown
|
|
restore_delivery_method
|
|
end
|
|
|
|
def test_should_be_the_set_delivery_method
|
|
assert_equal :sendmail, NonDefaultDeliveryMethodMailer.delivery_method
|
|
end
|
|
end
|
|
|