method

enqueued_jobs_size

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: TestHelper
enqueued_jobs_size(only: nil, queue: nil) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activejob/lib/active_job/test_helper.rb, line 353
      def enqueued_jobs_size(only: nil, queue: nil)
        enqueued_jobs.count do |job|
          job_class = job.fetch(:job)
          if only
            next false unless Array(only).include?(job_class)
          end
          if queue
            next false unless queue.to_s == job.fetch(:queue, job_class.queue_name)
          end
          true
        end
      end
Register or log in to add new notes.