Skip to content

Commit 73db5be

Browse files
committed
Test: Updates perform_request_spec
1 parent f1d57fd commit 73db5be

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

elasticsearch-api/spec/unit/perform_request_spec.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,11 @@
3939
params.merge(part.to_sym => 'testing')
4040
end
4141

42-
required_params.merge!(body: {}) if ['inference.put', 'inference.update'].include? spec.endpoint_name
42+
required_params.merge!(body: {}) if ['inference.put', 'inference.update', 'inference.chat_completion_unified'].include? spec.endpoint_name
4343

4444
let(:client_double) do
4545
Class.new { include Elasticsearch::API }.new.tap do |client|
4646
expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params|
47-
# The create method ends up becoming an 'index' request
48-
if expected_perform_request_params[:endpoint] == 'create'
49-
expected_perform_request_params[:endpoint] = 'index'
50-
end
5147
# Check that the expected hash is passed to the perform_request method
5248
expect(request_params).to eq(expected_perform_request_params)
5349
end.and_return(response_double)

0 commit comments

Comments
 (0)