diff options
author | Brian Cardarella <bcardarella@gmail.com> | 2012-06-24 04:21:02 -0400 |
---|---|---|
committer | Brian Cardarella <bcardarella@gmail.com> | 2012-06-24 04:21:02 -0400 |
commit | 33334d0ea8fed091a145ef04b48d103292d6b4e7 (patch) | |
tree | e55577a466929c2b36e5d4c775b2c9f74d1c65a0 /actionmailer | |
parent | 812d1e88c5218d4075878559476eaad65df1b761 (diff) | |
download | rails-33334d0ea8fed091a145ef04b48d103292d6b4e7.tar.gz rails-33334d0ea8fed091a145ef04b48d103292d6b4e7.tar.bz2 rails-33334d0ea8fed091a145ef04b48d103292d6b4e7.zip |
Forcing the message sending is no longer necessary
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/async.rb | 8 | ||||
-rw-r--r-- | actionmailer/test/base_test.rb | 9 |
2 files changed, 1 insertions, 16 deletions
diff --git a/actionmailer/lib/action_mailer/async.rb b/actionmailer/lib/action_mailer/async.rb index d7c34c1a7b..049d6afaea 100644 --- a/actionmailer/lib/action_mailer/async.rb +++ b/actionmailer/lib/action_mailer/async.rb @@ -32,14 +32,8 @@ module ActionMailer::Async end # Will push the message onto the Queue to be processed - # To force message delivery dispite async pass `true` - # Emailer.welcome.deliver(true) def deliver(force = false) - if force - run - else - @queue << self - end + @queue << self end end end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index f1988a8230..84e5399924 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -442,15 +442,6 @@ class BaseTest < ActiveSupport::TestCase assert_equal(1, AsyncMailer.deliveries.length) end - test "forcing message delivery despite asynchronous" do - testing_queue = Rails::Queueing::TestQueue.new - AsyncMailer.delivery_method = :test - AsyncMailer.deliveries.clear - stub_queue(AsyncMailer, testing_queue).welcome.deliver(true) - assert_equal(1, AsyncMailer.deliveries.length) - assert_predicate testing_queue, :empty? - 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 |