method

assert_performed_with

Importance_1
v5.0.0.1 - Show latest stable - 0 notes - Class: TestHelper
assert_performed_with(args = {}) public

Asserts that the job passed in the block has been performed with the given arguments.

def test_assert_performed_with
  assert_performed_with(job: MyJob, args: [1,2,3], queue: 'high') do
    MyJob.perform_later(1,2,3)
  end

  assert_performed_with(job: MyJob, at: Date.tomorrow.noon) do
    MyJob.set(wait_until: Date.tomorrow.noon).perform_later
  end
end
Show source
Register or log in to add new notes.