diff options
author | Adam <kohnkecomm@Adam-iMac.local> | 2008-05-23 10:40:36 -0700 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-29 10:38:00 +0100 |
commit | cf6299dbd73a8cb6d74265df03d01abe885e686a (patch) | |
tree | e54c80862aa91a2ca8fcf48d4d0775bad0bac912 /actionmailer/test | |
parent | abb1bd2efa43b8efbb3faf4ccfb9246704a9044c (diff) | |
download | rails-cf6299dbd73a8cb6d74265df03d01abe885e686a.tar.gz rails-cf6299dbd73a8cb6d74265df03d01abe885e686a.tar.bz2 rails-cf6299dbd73a8cb6d74265df03d01abe885e686a.zip |
Add ActionMailer#reply_to. [#245 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-x | actionmailer/test/mail_service_test.rb | 34 |
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 |