You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing actions that can kick off background jobs, it would be nice to be able to have succinct and fine-grained assertions on exactly what jobs were fired.
Oban provides assert_enqueued, and that can be used eg.
# A job should be enqueued to make the meeting on Zoomassert_enqueued(args: %{primary_key: %{id: appointment.id}},queue: :zoom_api)
But nothing really more specific, given that worker modules are dynamically defined.
It would be great if assert_enqueued was wrapped in a way that if we had code like:
When testing actions that can kick off background jobs, it would be nice to be able to have succinct and fine-grained assertions on exactly what jobs were fired.
Oban provides
assert_enqueued
, and that can be used eg.But nothing really more specific, given that worker modules are dynamically defined.
It would be great if
assert_enqueued
was wrapped in a way that if we had code like:We could test it like:
The text was updated successfully, but these errors were encountered: