mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
f7e7fdc52c
commit
10cc06809d
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue