Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have_enqueued_sidekiq_job doesn't check order of arguments given to Job #144

Closed
shifakhan opened this issue Sep 6, 2017 · 2 comments · Fixed by #200
Closed

have_enqueued_sidekiq_job doesn't check order of arguments given to Job #144

shifakhan opened this issue Sep 6, 2017 · 2 comments · Fixed by #200
Milestone

Comments

@shifakhan
Copy link

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?

@jughead
Copy link

jughead commented Dec 26, 2017

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

@wspurgin wspurgin added this to the v4.0.0 milestone Aug 1, 2023
@wspurgin
Copy link
Owner

wspurgin commented Aug 1, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants