Sha256: 0401a43bcd32c452bbc30c737a51352d181521a640574992e94229fd63a49f52

Contents?: true

Size: 915 Bytes

Versions: 2

Compression:

Stored size: 915 Bytes

Contents

require 'test_helper'

module Elasticsearch
  module Test
    class IndicesGetSettingsTest < ::Test::Unit::TestCase

      context "Indices: Get settings" do
        subject { FakeClient.new }

        should "perform correct request" do
          subject.expects(:perform_request).with do |method, url, params, body|
            assert_equal 'GET', method
            assert_equal '_settings', url
            assert_equal Hash.new, params
            assert_nil   body
            true
          end.returns(FakeResponse.new)

          subject.indices.get_settings
        end

        should "perform request against an index" do
          subject.expects(:perform_request).with do |method, url, params, body|
            assert_equal 'foo/_settings', url
            true
          end.returns(FakeResponse.new)

          subject.indices.get_settings :index => 'foo'
        end

      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
elasticsearch-api-0.4.0 test/unit/indices/get_settings_test.rb
elasticsearch-api-0.0.2 test/unit/indices/get_settings_test.rb