spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb in elasticsearch-api-8.10.0 vs spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb in elasticsearch-api-8.11.0
- old
+ new
@@ -23,11 +23,12 @@
[
'GET',
url,
{},
nil,
- {}
+ {},
+ { endpoint: 'nodes.hot_threads' }
]
end
let(:url) do
'_nodes/hot_threads'
@@ -41,18 +42,40 @@
let(:url) do
'_nodes/foo/hot_threads'
end
+ let(:expected_args) do
+ [
+ 'GET',
+ url,
+ {},
+ nil,
+ {},
+ { defined_params: { node_id: 'foo' }, endpoint: 'nodes.hot_threads' }
+ ]
+ end
+
it 'performs the request' do
expect(client_double.nodes.hot_threads(node_id: 'foo')).to be_a Elasticsearch::API::Response
end
end
context 'when the path must be URL-escaped' do
let(:url) do
'_nodes/foo%5Ebar/hot_threads'
+ end
+
+ let(:expected_args) do
+ [
+ 'GET',
+ url,
+ {},
+ nil,
+ {},
+ { defined_params: { node_id: 'foo^bar' }, endpoint: 'nodes.hot_threads' }
+ ]
end
it 'performs the request' do
expect(client_double.nodes.hot_threads(node_id: 'foo^bar')).to be_a Elasticsearch::API::Response
end