aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/asset_host_test.rb
diff options
context:
space:
mode:
authorJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-24 17:31:18 +0100
committerJosé Valim and Mikel Lindsaar <pair@programming.com>2010-01-24 17:31:18 +0100
commitf30d73bab4c676b187276797ac2a6dc89132c43f (patch)
tree36cb0f1f3aaa3edf5b7daee48df69d22ae21ba34 /actionmailer/test/asset_host_test.rb
parent7409b734841c8bd691006634dd072212aa905cf4 (diff)
downloadrails-f30d73bab4c676b187276797ac2a6dc89132c43f.tar.gz
rails-f30d73bab4c676b187276797ac2a6dc89132c43f.tar.bz2
rails-f30d73bab4c676b187276797ac2a6dc89132c43f.zip
Add new class delivery method API.
Diffstat (limited to 'actionmailer/test/asset_host_test.rb')
-rw-r--r--actionmailer/test/asset_host_test.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/actionmailer/test/asset_host_test.rb b/actionmailer/test/asset_host_test.rb
index 7ba78b6daa..124032f1d9 100644
--- a/actionmailer/test/asset_host_test.rb
+++ b/actionmailer/test/asset_host_test.rb
@@ -1,8 +1,8 @@
require 'abstract_unit'
class AssetHostMailer < ActionMailer::Base
- def email_with_asset(recipient)
- recipients recipient
+ def email_with_asset
+ recipients 'test@localhost'
subject "testing email containing asset path while asset_host is set"
from "tester@example.com"
end
@@ -13,8 +13,6 @@ class AssetHostTest < Test::Unit::TestCase
set_delivery_method :test
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.deliveries.clear
-
- @recipient = 'test@localhost'
end
def teardown
@@ -23,7 +21,7 @@ class AssetHostTest < Test::Unit::TestCase
def test_asset_host_as_string
ActionController::Base.asset_host = "http://www.example.com"
- mail = AssetHostMailer.deliver_email_with_asset(@recipient)
+ mail = AssetHostMailer.email_with_asset
assert_equal "<img alt=\"Somelogo\" src=\"http://www.example.com/images/somelogo.png\" />", mail.body.to_s.strip
end
@@ -35,7 +33,7 @@ class AssetHostTest < Test::Unit::TestCase
"http://assets.example.com"
end
}
- mail = AssetHostMailer.deliver_email_with_asset(@recipient)
+ mail = AssetHostMailer.email_with_asset
assert_equal "<img alt=\"Somelogo\" src=\"http://images.example.com/images/somelogo.png\" />", mail.body.to_s.strip
end
@@ -48,7 +46,7 @@ class AssetHostTest < Test::Unit::TestCase
end
}
mail = nil
- assert_nothing_raised { mail = AssetHostMailer.deliver_email_with_asset(@recipient) }
+ assert_nothing_raised { mail = AssetHostMailer.email_with_asset }
assert_equal "<img alt=\"Somelogo\" src=\"http://www.example.com/images/somelogo.png\" />", mail.body.to_s.strip
end
end \ No newline at end of file