rspec-sidekiq
rspec-sidekiq copied to clipboard
have_enqueued_sidekiq_job doesn't check order of arguments given to Job
Code
AwesomeJob.perform_async 'Awesome', true
Tests -
expect(AwesomeJob).to have_enqueued_sidekiq_job('Awesome', true)
expect(AwesomeJob).to have_enqueued_sidekiq_job(true, 'Awesome')
Both tests pass. Is this expected behaviour ? Shouldn't we check the order of the arguments as well?
Got the same problem by passing custom matcher. This is the reason: https://github.com/philostler/rspec-sidekiq/blob/develop/lib/rspec/sidekiq/matchers/have_enqueued_job.rb#L84
Oof yeah this is a nasty one since we use ContainsExactly which doesn't care about the order. I'll fix it for the V4 release