diff --git a/activejob/test/cases/test_helper_test.rb b/activejob/test/cases/test_helper_test.rb index dfef1c8e5e1..64fca4d6030 100644 --- a/activejob/test/cases/test_helper_test.rb +++ b/activejob/test/cases/test_helper_test.rb @@ -515,6 +515,12 @@ class EnqueuedJobsTest < ActiveJob::TestCase end end + def test_assert_no_enqueued_jobs_and_perform_now + assert_no_enqueued_jobs do + LoggingJob.perform_now(1, 2, 3, keyword: true) + end + end + def test_assert_enqueued_with_returns job = assert_enqueued_with(job: LoggingJob) do LoggingJob.set(wait_until: 5.minutes.from_now).perform_later(1, 2, 3, keyword: true) diff --git a/activejob/test/jobs/logging_job.rb b/activejob/test/jobs/logging_job.rb index 4605fa69372..d4ec2142f5e 100644 --- a/activejob/test/jobs/logging_job.rb +++ b/activejob/test/jobs/logging_job.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class LoggingJob < ActiveJob::Base - def perform(dummy) - logger.info "Dummy, here is it: #{dummy}" + def perform(*dummy) + logger.info "Dummy, here is it: #{dummy.join(" ")}" end def job_id