mirror of https://github.com/rails/rails
Update the ActionMailer tests to run off of the latest ActionController config refactor
This commit is contained in:
parent
ad2e6ee4ec
commit
05b9382e29
|
@ -14,6 +14,10 @@ class AssetHostTest < Test::Unit::TestCase
|
|||
set_delivery_method :test
|
||||
ActionMailer::Base.perform_deliveries = true
|
||||
ActionMailer::Base.deliveries.clear
|
||||
AssetHostMailer.configure do |c|
|
||||
c.asset_host = "http://www.example.com"
|
||||
c.assets_dir = ''
|
||||
end
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
@ -21,11 +25,6 @@ class AssetHostTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_asset_host_as_string
|
||||
ActionMailer::Base.configure do |c|
|
||||
c.asset_host = "http://www.example.com"
|
||||
c.assets_dir = File.dirname(__FILE__)
|
||||
end
|
||||
|
||||
mail = AssetHostMailer.email_with_asset
|
||||
assert_equal "<img alt=\"Somelogo\" src=\"http://www.example.com/images/somelogo.png\" />", mail.body.to_s.strip
|
||||
end
|
||||
|
|
|
@ -13,6 +13,10 @@ end
|
|||
class TestMailer < ActionMailer::Base
|
||||
default_url_options[:host] = 'www.basecamphq.com'
|
||||
|
||||
configure do |c|
|
||||
c.assets_dir = '' # To get the tests to pass
|
||||
end
|
||||
|
||||
def signed_up_with_url(recipient)
|
||||
@recipients = recipient
|
||||
@subject = "[Signed up] Welcome #{recipient}"
|
||||
|
|
Loading…
Reference in New Issue