aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-22 20:17:27 +0100
committerYehuda Katz <wycats@Yehuda-Katz.local>2009-12-22 11:29:06 -0800
commit4964d3b02cd5c87d821ab7d41d243154c727185d (patch)
treee3818132241dd91d62ac1483219df16f973cf679 /actionmailer/test
parent8e48a5ef0ca488b2264acd2b38bdae14970c011f (diff)
downloadrails-4964d3b02cd5c87d821ab7d41d243154c727185d.tar.gz
rails-4964d3b02cd5c87d821ab7d41d243154c727185d.tar.bz2
rails-4964d3b02cd5c87d821ab7d41d243154c727185d.zip
Make ActionMailer::Base inherit from AbstractController::Base
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
Diffstat (limited to 'actionmailer/test')
-rw-r--r--actionmailer/test/mail_service_test.rb8
-rw-r--r--actionmailer/test/url_test.rb4
2 files changed, 7 insertions, 5 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index 697265b8ec..1cd3bc77c4 100644
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -34,13 +34,13 @@ class TestMailer < ActionMailer::Base
def from_with_name
from "System <system@loudthinking.com>"
recipients "root@loudthinking.com"
- body "Nothing to see here."
+ render :text => "Nothing to see here."
end
def from_without_name
from "system@loudthinking.com"
recipients "root@loudthinking.com"
- body "Nothing to see here."
+ render :text => "Nothing to see here."
end
def cc_bcc(recipient)
@@ -301,6 +301,7 @@ class TestMailer < ActionMailer::Base
render :text => "testing"
end
+ # This tests body calls accepeting a hash, which is deprecated.
def body_ivar(recipient)
recipients recipient
subject "Body as a local variable"
@@ -1043,7 +1044,8 @@ EOF
end
def test_body_is_stored_as_an_ivar
- mail = TestMailer.create_body_ivar(@recipient)
+ mail = nil
+ ActiveSupport::Deprecation.silence { mail = TestMailer.create_body_ivar(@recipient) }
assert_equal "body: foo\nbar: baz", mail.body
end
diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb
index 18eb355e7d..1140613132 100644
--- a/actionmailer/test/url_test.rb
+++ b/actionmailer/test/url_test.rb
@@ -12,8 +12,8 @@ class TestMailer < ActionMailer::Base
@from = "system@loudthinking.com"
@sent_on = Time.local(2004, 12, 12)
- @body["recipient"] = recipient
- @body["welcome_url"] = url_for :host => "example.com", :controller => "welcome", :action => "greeting"
+ @recipient = recipient
+ @welcome_url = url_for :host => "example.com", :controller => "welcome", :action => "greeting"
end
class <<self