Ticket #7571: return_path_test.diff
| File return_path_test.diff, 1.1 kB (added by joost, 2 years ago) |
|---|
-
mail_service_test.rb
old new 236 236 body "testing" 237 237 end 238 238 239 def return_path 240 recipients "no.one@nowhere.test" 241 subject "return path test" 242 from "some.one@somewhere.test" 243 body "testing" 244 headers "return-path" => "another@somewhere.test" 245 end 246 239 247 class <<self 240 248 attr_accessor :received_body 241 249 end … … 810 818 assert_match %r{format=flowed}, mail['content-type'].to_s 811 819 assert_match %r{charset=utf-8}, mail['content-type'].to_s 812 820 end 821 822 def test_return_path_with_create 823 mail = TestMailer.create_return_path 824 assert_equal "<another@somewhere.test>", mail['return-path'].to_s 825 end 826 827 def test_return_path_with_deliver 828 ActionMailer::Base.delivery_method = :smtp 829 TestMailer.deliver_return_path 830 assert_match %r{^Return-Path: <another@somewhere.test>}, MockSMTP.deliveries[0][0] 831 end 813 832 end 814 833 815 834 end # uses_mocha