Open rubendinho opened 5 months ago
Ah the Current Attributes middleware yes... There isn't a mechanism currently to just match anything directly against the context, but it should be fairly trivial to add.
In the end, you want something like this?
expect(FooWorker).to have_enqueued_sidekiq_job(123).with_context(cattr: hash_including("sidekiq_queue" => anything())
Hello -
is there a way to match by context outside of the helpers provided? For example, I'd like to match by "retry"
Here's what I'm trying to do:
Specifically, I'm trying to match by the
cattr.sidekiq_queue
. It would be nice to have something like:expect(FooWorker).to have_enqueued_sidekiq_job(123).with(retry: 25)