Skip to content

Commit

Permalink
Spec fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ql committed Aug 19, 2024
1 parent c9774a0 commit d8fd9aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/chewy/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def initialize
end

def transport_logger=(logger)
Chewy.client.transport.transport.logger = logger
Chewy.client.transport.logger = logger
@transport_logger = logger
end

def transport_tracer=(tracer)
Chewy.client.transport.transport.tracer = tracer
Chewy.client.transport.tracer = tracer
@transport_tracer = tracer
end

Expand Down
4 changes: 2 additions & 2 deletions spec/chewy/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

specify do
expect { subject.transport_logger = logger }
.to change { Chewy.client.transport.transport.logger }.to(logger)
.to change { Chewy.client.transport.logger }.to(logger)
end
specify do
expect { subject.transport_logger = logger }
Expand All @@ -40,7 +40,7 @@

specify do
expect { subject.transport_tracer = tracer }
.to change { Chewy.client.transport.transport.tracer }.to(tracer)
.to change { Chewy.client.transport.tracer }.to(tracer)
end
specify do
expect { subject.transport_tracer = tracer }
Expand Down
2 changes: 1 addition & 1 deletion spec/chewy/strategy/delayed_sidekiq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def expected_at_time
context 'both calls with different update fields' do
it 'deos reindex with union of fields' do
Timecop.freeze do
expect(CitiesIndex).to receive(:import!).with(match_array([city.id, other_city.id]), update_fields: %w[name description]).once
expect(CitiesIndex).to receive(:import!).with(match_array([city.id, other_city.id]), update_fields: match_array(%w[name description])).once
scheduler = Chewy::Strategy::DelayedSidekiq::Scheduler.new(CitiesIndex, [city.id], update_fields: ['name'])
scheduler.postpone
scheduler = Chewy::Strategy::DelayedSidekiq::Scheduler.new(CitiesIndex, [other_city.id], update_fields: ['description'])
Expand Down

0 comments on commit d8fd9aa

Please sign in to comment.