aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorTomK32 <tomk32@tomk32.de>2008-06-11 19:22:51 +0200
committerTomK32 <tomk32@tomk32.de>2008-06-11 19:22:51 +0200
commit6a5ac86207765e2c041378b35c05812f9bfe68b9 (patch)
tree4b341329991f2bd08c01d2f139c4c3721a8fbe25 /actionmailer/test
parentfa0cca368f74119b561595cc6ca7454f7debdf6b (diff)
parentd4b7cd99e8e7051c9d3ed6722f9627d5d4dea4e9 (diff)
downloadrails-6a5ac86207765e2c041378b35c05812f9bfe68b9.tar.gz
rails-6a5ac86207765e2c041378b35c05812f9bfe68b9.tar.bz2
rails-6a5ac86207765e2c041378b35c05812f9bfe68b9.zip
Merge branch 'master' of git@github.com:lifo/docrails
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