Oban.Testing.all_enqueued
You're seeing just the function
all_enqueued
, go back to Oban.Testing module for more information.
Specs
all_enqueued(repo :: module(), opts :: Keyword.t()) :: [Oban.Job.t()]
Retrieve all currently enqueued jobs matching a set of options.
Only jobs matching all of the provided arguments will be returned. Additionally, jobs are returned in descending order where the most recently enqueued job will be listed first.
Examples
Assert based on only some of a job's args:
assert [%{args: %{"id" => 1}}] = all_enqueued(worker: MyWorker)
Assert that exactly one job was inserted for a queue:
assert [%Oban.Job{}] = all_enqueued(queue: :alpha)