spec/elasticsearch/api/actions/snapshot/restore_spec.rb in elasticsearch-api-7.17.11 vs spec/elasticsearch/api/actions/snapshot/restore_spec.rb in elasticsearch-api-8.0.0.pre1
- old
+ new
@@ -16,36 +16,33 @@
# under the License.
require 'spec_helper'
describe 'client.snapshot#restore' do
-
let(:expected_args) do
[
- 'POST',
- '_snapshot/foo/bar/_restore',
- {},
- nil,
- {}
+ 'POST',
+ '_snapshot/foo/bar/_restore',
+ {},
+ nil,
+ {}
]
end
let(:client) do
Class.new { include Elasticsearch::API }.new
end
it 'requires the :snapshot argument' do
- expect {
- client.snapshot.restore(repository: 'foo')
- }.to raise_exception(ArgumentError)
+ expect { client.snapshot.restore(repository: 'foo') }.to raise_exception(ArgumentError)
end
it 'requires the :repository argument' do
expect {
client.snapshot.restore(snapshot: 'bar')
}.to raise_exception(ArgumentError)
end
it 'performs the request' do
- expect(client_double.snapshot.restore(repository: 'foo', snapshot: 'bar')).to eq({})
+ expect(client_double.snapshot.restore(repository: 'foo', snapshot: 'bar')).to be_a Elasticsearch::API::Response
end
end