Queuetopia.Test.Assertions (queuetopia v2.5.2) View Source

Link to this section Summary

Link to this section Functions

Link to this function

assert_job_created(queuetopia, job_attrs \\ %{})

View Source

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"}})
Link to this function

assert_job_created(queuetopia, expected_count, job_attrs)

View Source
Link to this function

jobs_created(queuetopia, job_attrs \\ %{})

View Source

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)
Link to this function

refute_job_created(queuetopia, job_attrs \\ %{})

View Source

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"}})