Queuetopia.Test.Assertions (queuetopia v2.5.2) View Source
Link to this section Summary
Functions
Asserts the job has juste been created
Find jobs that have just been created
Refute that a job has been created.
Link to this section Functions
Asserts the job has juste been created
It can be used as below:
# Examples
job = MyQueuetopia.create_job("mailer_queue", "deliver_mail", %{body: "hello", from: "from", to: "to"})
assert_job_created(MyQueuetopia)
assert_job_created(MyQueuetopia, 1)
assert_job_created(MyQueuetopia, %{queue: "mailer_queue", params: %{body: "hello"}})
assert_job_created(MyQueuetopia, 2, %{action: "deliver_email", params: %{body: "hello"}})
Find jobs that have just been created
It can be used as below:
# Examples
MyQueuetopia.create_job("mailer_queue", "deliver_mail", %{body: "hello", from: "from", to: "to"})
assert [job] = jobs_created(MyQueuetopia)
Refute that a job has been created.
It can be used as below:
# Examples
job = MyQueuetopia.create_job("mailer_queue", "deliver_mail", %{body: "hello", from: "from", to: "to"})
refute_job_created(MyQueuetopia)
refute_job_created(MyQueuetopia, %{queue: "mailer_queue", params: %{body: "hello"}})