Sha256: 12757a662829fff8ec7fc27b63bb391d8fd2a01e81326b33ae186aef3631247d

Contents?: true

Size: 790 Bytes

Versions: 8

Compression:

Stored size: 790 Bytes

Contents

# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information

require 'spec_helper'

describe 'client.cluster#state' do

  let(:expected_args) do
    [
        'GET',
        '_cluster/state',
        {},
        nil,
        nil
    ]
  end

  it 'performs the request' do
    expect(client_double.cluster.state).to eq({})
  end

  context 'when a metric is specified' do

    let(:expected_args) do
      [
          'GET',
          '_cluster/state/foo,bar',
          {},
          nil,
          nil
      ]
    end

    it 'performs the request' do
      expect(client_double.cluster.state(metric: ['foo', 'bar'])).to eq({})
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
elasticsearch-api-6.8.3 spec/elasticsearch/api/actions/cluster/state_spec.rb
elasticsearch-api-6.8.2 spec/elasticsearch/api/actions/cluster/state_spec.rb
elasticsearch-api-7.6.0 spec/elasticsearch/api/actions/cluster/state_spec.rb
elasticsearch-api-7.6.0.pre spec/elasticsearch/api/actions/cluster/state_spec.rb
elasticsearch-api-7.5.0 spec/elasticsearch/api/actions/cluster/state_spec.rb
elasticsearch-api-7.5.0.pre.pre spec/elasticsearch/api/actions/cluster/state_spec.rb
elasticsearch-api-7.4.0 spec/elasticsearch/api/actions/cluster/state_spec.rb
elasticsearch-api-7.3.0 spec/elasticsearch/api/actions/cluster/state_spec.rb