Skip to content

Commit

Permalink
[API] Update reload_secure_settings spec
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Apr 28, 2020
1 parent ef6364c commit b1434e2
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
require 'spec_helper'

describe 'client#reload_secure_settings' do

let(:expected_args) do
[
'POST',
url,
params,
nil,
body,
{}
]
end
Expand All @@ -20,6 +19,8 @@
{}
end

let(:body) { nil }

let(:url) do
'_nodes/reload_secure_settings'
end
Expand All @@ -29,7 +30,6 @@
end

context 'when a node id is specified' do

let(:url) do
'_nodes/foo/reload_secure_settings'
end
Expand All @@ -40,31 +40,36 @@
end

context 'when more than one node id is specified as a string' do

let(:url) do
'_nodes/foo,bar/reload_secure_settings'
end

let(:body) do
{ foo: 'bar' }
end

it 'performs the request' do
expect(client_double.nodes.reload_secure_settings(node_id: 'foo,bar', body: { foo: 'bar' })).to eq({})
end
end

context 'when more than one node id is specified as a list' do

let(:url) do
'_nodes/foo,bar/reload_secure_settings'
end

let(:body) do
{ foo: 'bar' }
end

it 'performs the request' do
expect(client_double.nodes.reload_secure_settings(node_id: ['foo', 'bar'], body: { foo: 'bar' })).to eq({})
end
end

context 'when a timeout param is specified' do

let(:params) do
{ timeout: '30s'}
{ timeout: '30s' }
end

it 'performs the request' do
Expand Down

0 comments on commit b1434e2

Please sign in to comment.