aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-06-02 12:29:28 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-06-02 12:29:28 +0100
commit719aa13b0781d662673dba2225bc707fc4182b5e (patch)
tree057cabf17152a1ab0ccc749dd361eeaf754c38de /actionmailer/test
parentad3c97cea6dd0714652db7d9b5b4d06b81e5c035 (diff)
parenta980eb8c7734f14109d8c2a02a88dafdf682e0dc (diff)
downloadrails-719aa13b0781d662673dba2225bc707fc4182b5e.tar.gz
rails-719aa13b0781d662673dba2225bc707fc4182b5e.tar.bz2
rails-719aa13b0781d662673dba2225bc707fc4182b5e.zip
Merge commit 'mainstream/master'
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-xactionmailer/test/mail_service_test.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index 57a651ccd4..e5ecb0e254 100755
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -40,6 +40,15 @@ class TestMailer < ActionMailer::Base
body "Nothing to see here."
end
+ def different_reply_to(recipient)
+ recipients recipient
+ subject "testing reply_to"
+ from "system@loudthinking.com"
+ sent_on Time.local(2008, 5, 23)
+ reply_to "atraver@gmail.com"
+ body "Nothing to see here."
+ end
+
def iso_charset(recipient)
@recipients = recipient
@subject = "testing isø charsets"
@@ -445,6 +454,31 @@ class ActionMailerTest < Test::Unit::TestCase
assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
end
+ def test_reply_to
+ expected = new_mail
+
+ expected.to = @recipient
+ expected.subject = "testing reply_to"
+ expected.body = "Nothing to see here."
+ expected.from = "system@loudthinking.com"
+ expected.reply_to = "atraver@gmail.com"
+ expected.date = Time.local 2008, 5, 23
+
+ created = nil
+ assert_nothing_raised do
+ created = TestMailer.create_different_reply_to @recipient
+ end
+ assert_not_nil created
+ assert_equal expected.encoded, created.encoded
+
+ assert_nothing_raised do
+ TestMailer.deliver_different_reply_to @recipient
+ end
+
+ assert_not_nil ActionMailer::Base.deliveries.first
+ assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
+ end
+
def test_iso_charset
expected = new_mail( "iso-8859-1" )
expected.to = @recipient