Sha256: 0ec8382145e24fe9525bc5bdd3cba429fca2f08a073f90b49bfc663bb8dc4ff3
Contents?: true
Size: 1.54 KB
Versions: 77
Compression:
Stored size: 1.54 KB
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 should "URL-escape the parts" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'foo%5Ebar/_settings', url true end.returns(FakeResponse.new) subject.indices.get_settings :index => 'foo^bar' end should "get specific settings" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'foo/_settings/foo.bar', url assert_equal Hash.new, params true end.returns(FakeResponse.new) subject.indices.get_settings :index => 'foo', :name => 'foo.bar' end end end end end
Version data entries
77 entries across 77 versions & 6 rubygems