diff options
author | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-25 21:47:03 +1100 |
---|---|---|
committer | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-25 21:47:03 +1100 |
commit | ace74974cf3575bbd3bf7ff4d8a83c3100fd22a9 (patch) | |
tree | ee3f53d8257623cd8544eee40528ddea74096a33 /actionmailer/test/base_test.rb | |
parent | 4240369a4399b944a0652807c545ffe99d7fb0cd (diff) | |
download | rails-ace74974cf3575bbd3bf7ff4d8a83c3100fd22a9.tar.gz rails-ace74974cf3575bbd3bf7ff4d8a83c3100fd22a9.tar.bz2 rails-ace74974cf3575bbd3bf7ff4d8a83c3100fd22a9.zip |
Got AM working with Mail yield on delivery_handler and updated tests
Diffstat (limited to 'actionmailer/test/base_test.rb')
-rw-r--r-- | actionmailer/test/base_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 81e1df3911..0705f22df8 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -363,6 +363,13 @@ class BaseTest < ActiveSupport::TestCase BaseMailer.welcome.deliver assert_equal(1, BaseMailer.deliveries.length) end + + test "calling deliver, ActionMailer should yield back to mail to let it call :do_delivery on itself" do + mail = Mail::Message.new + mail.expects(:do_delivery).once + BaseMailer.expects(:welcome).returns(mail) + BaseMailer.welcome.deliver + end protected |