aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-03-14 01:22:07 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-03-14 01:31:35 +0200
commit10cc06809d3cc77f861b44b866b8d0577497a574 (patch)
treecaee658b3560430f04115f3b53de112ced621f5c /actionmailer
parentf7e7fdc52c35f61eaf0c11dbeb0a267baa0acb82 (diff)
downloadrails-10cc06809d3cc77f861b44b866b8d0577497a574.tar.gz
rails-10cc06809d3cc77f861b44b866b8d0577497a574.tar.bz2
rails-10cc06809d3cc77f861b44b866b8d0577497a574.zip
Partly revert #32231
- Remove extra execution of `perform_enqueued_jobs` since it performs all enqueued jobs in the duration of the block. - Fix example of using `assert_emails` without block since we can't use enqueued jobs in this case.
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/test_helper.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/actionmailer/lib/action_mailer/test_helper.rb b/actionmailer/lib/action_mailer/test_helper.rb
index ec748236b4..e9ddef3b94 100644
--- a/actionmailer/lib/action_mailer/test_helper.rb
+++ b/actionmailer/lib/action_mailer/test_helper.rb
@@ -14,7 +14,7 @@ module ActionMailer
# assert_emails 0
# ContactMailer.welcome.deliver_now
# assert_emails 1
- # ContactMailer.welcome.deliver_later
+ # ContactMailer.welcome.deliver_now
# assert_emails 2
# end
#
@@ -38,9 +38,7 @@ module ActionMailer
new_count = ActionMailer::Base.deliveries.size
assert_equal number, new_count - original_count, "#{number} emails expected, but #{new_count - original_count} were sent"
else
- perform_enqueued_jobs(only: [ActionMailer::DeliveryJob, ActionMailer::Parameterized::DeliveryJob]) do
- assert_equal number, ActionMailer::Base.deliveries.size
- end
+ assert_equal number, ActionMailer::Base.deliveries.size
end
end