Sha256: f262709a761c895e6073433e2f0f58619a6cd5537b55aa4ab5d84ac21b1dc600

Contents?: true

Size: 786 Bytes

Versions: 1

Compression:

Stored size: 786 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#get_all_pits' do
  let(:expected_args) do
    [
      'GET',
      '_search/point_in_time/_all',
      {},
      nil
    ]
  end

  let(:client) do
    Class.new { include OpenSearch::API }.new
  end

  it 'does not accept unregistered params' do
    expect {
      client.get_all_pits(something: :else)
    }.to raise_exception(ArgumentError)
  end

  it 'performs the request with all optional params' do
    expect(client_double.get_all_pits).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/get_all_pits_spec.rb