Skip to content

Commit b1434e2

Browse files
committed
[API] Update reload_secure_settings spec
1 parent ef6364c commit b1434e2

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

elasticsearch-api/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
require 'spec_helper'
66

77
describe 'client#reload_secure_settings' do
8-
98
let(:expected_args) do
109
[
1110
'POST',
1211
url,
1312
params,
14-
nil,
13+
body,
1514
{}
1615
]
1716
end
@@ -20,6 +19,8 @@
2019
{}
2120
end
2221

22+
let(:body) { nil }
23+
2324
let(:url) do
2425
'_nodes/reload_secure_settings'
2526
end
@@ -29,7 +30,6 @@
2930
end
3031

3132
context 'when a node id is specified' do
32-
3333
let(:url) do
3434
'_nodes/foo/reload_secure_settings'
3535
end
@@ -40,31 +40,36 @@
4040
end
4141

4242
context 'when more than one node id is specified as a string' do
43-
4443
let(:url) do
4544
'_nodes/foo,bar/reload_secure_settings'
4645
end
4746

47+
let(:body) do
48+
{ foo: 'bar' }
49+
end
50+
4851
it 'performs the request' do
4952
expect(client_double.nodes.reload_secure_settings(node_id: 'foo,bar', body: { foo: 'bar' })).to eq({})
5053
end
5154
end
5255

5356
context 'when more than one node id is specified as a list' do
54-
5557
let(:url) do
5658
'_nodes/foo,bar/reload_secure_settings'
5759
end
5860

61+
let(:body) do
62+
{ foo: 'bar' }
63+
end
64+
5965
it 'performs the request' do
6066
expect(client_double.nodes.reload_secure_settings(node_id: ['foo', 'bar'], body: { foo: 'bar' })).to eq({})
6167
end
6268
end
6369

6470
context 'when a timeout param is specified' do
65-
6671
let(:params) do
67-
{ timeout: '30s'}
72+
{ timeout: '30s' }
6873
end
6974

7075
it 'performs the request' do

0 commit comments

Comments
 (0)