1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
Mikel Lindsaar 2010-01-08 12:15:36 +11:00
parent 8087d51842
commit 1ddf17dff0

View file

@ -1110,10 +1110,15 @@ EOF
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