Permalink
Browse files

Return-Path per RFC needs '<' and '>' around the addr_spec

  • Loading branch information...
1 parent 8087d51 commit 1ddf17dff0cb21c9e13842af82cfbd0c22c38e62 @mikel mikel committed Jan 8, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 actionmailer/test/mail_service_test.rb
@@ -1110,10 +1110,15 @@ def test_return_path_with_create
assert_equal "another@somewhere.test", mail['return-path'].to_s
end
+ def test_return_path_with_create
+ mail = TestMailer.create_return_path
+ assert_equal "another@somewhere.test", mail.return_path
+ end
+
def test_return_path_with_deliver
ActionMailer::Base.delivery_method = :smtp
TestMailer.deliver_return_path
- assert_match %r{^Return-Path:.*another@somewhere.test}, MockSMTP.deliveries[0][0]
+ assert_match %r{^Return-Path: <another@somewhere.test>}, MockSMTP.deliveries[0][0]
assert_equal "another@somewhere.test", MockSMTP.deliveries[0][1].to_s
end

0 comments on commit 1ddf17d

Please sign in to comment.