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:
parent
8087d51842
commit
1ddf17dff0
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue