Skip to content

Commit

Permalink
Fix Index.import! empty args
Browse files Browse the repository at this point in the history
Take into account  different ruby versions.
  • Loading branch information
sl4vr committed Feb 8, 2022
1 parent 27193f7 commit bdc9e6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/chewy/strategy/lazy_sidekiq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
end

it 'calls Index#import!' do
expect(CitiesIndex).to receive(:import!).with([city.id, other_city.id])
empty_options = {} if RUBY_VERSION < '2.7'
expect(CitiesIndex).to receive(:import!).with(*[[city.id, other_city.id], empty_options].compact)

expect(::Sidekiq::Client).to receive(:push)
.with(hash_including('class' => Chewy::Strategy::Sidekiq::Worker, 'queue' => 'low'))
.and_call_original
Expand Down

0 comments on commit bdc9e6f

Please sign in to comment.