diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-06-28 06:25:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-28 06:25:50 -0400 |
commit | 9d6bbf4e0b2d2b2e2fccd87a778de2893bb28a25 (patch) | |
tree | b350db63c5de47055d0433cea3d02d110259acce | |
parent | 5a1ea09062eaed78e21253a128d433a1beb745ad (diff) | |
parent | 3919cb398b7de5efc94332dbde2924257d479a42 (diff) | |
download | rails-9d6bbf4e0b2d2b2e2fccd87a778de2893bb28a25.tar.gz rails-9d6bbf4e0b2d2b2e2fccd87a778de2893bb28a25.tar.bz2 rails-9d6bbf4e0b2d2b2e2fccd87a778de2893bb28a25.zip |
Merge pull request #33243 from evopark/fix/action-mailer-test-helper-no-block
Fix ActionMailer assert_enqueued_email_with
-rw-r--r-- | activejob/lib/active_job/test_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb index 1cd2c40c15..43417b8a12 100644 --- a/activejob/lib/active_job/test_helper.rb +++ b/activejob/lib/active_job/test_helper.rb @@ -301,7 +301,7 @@ module ActiveJob original_enqueued_jobs_count = enqueued_jobs.count expected = { job: job, args: args, at: at, queue: queue }.compact serialized_args = serialize_args_for_assertion(expected) - yield + yield if block_given? in_block_jobs = enqueued_jobs.drop(original_enqueued_jobs_count) matching_job = in_block_jobs.find do |in_block_job| serialized_args.all? { |key, value| value == in_block_job[key] } |