Sha256: bc8698e318caf85fa9eb9d245cd706b9cc8f58999fa359575fb78f859cbe6585
Contents?: true
Size: 956 Bytes
Versions: 1
Compression:
Stored size: 956 Bytes
Contents
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. # # Modifications Copyright OpenSearch Contributors. See # GitHub history for details. require 'spec_helper' describe 'client.cat#pit_segments' do let(:expected_args) do [ 'GET', '_cat/pit_segments', {}, { pit_id: ['abc'] }, {} ] end let(:client) do Class.new { include OpenSearch::API }.new end it 'requires the :body argument' do expect { client.cat.pit_segments }.to raise_exception(ArgumentError) end it 'does not accept unregistered params' do expect { client.cat.pit_segments(body: {}, something: :else) }.to raise_exception(ArgumentError) end it 'performs the request' do expect(client_double.cat.pit_segments(body: { pit_id: ['abc'] })).to eq({}) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opensearch-api-2.2.0 | spec/opensearch/api/actions/cat/pit_segments_spec.rb |