Sha256: eca57d46d8c084fbe108cd19e92db355be390e12ffe85dfa42e1423bc279add5
Contents?: true
Size: 1.3 KB
Versions: 2
Compression:
Stored size: 1.3 KB
Contents
require 'test_helper' module Elasticsearch module Test class IndicesDeleteMappingTest < ::Test::Unit::TestCase context "Indices: Delete mapping" do subject { FakeClient.new } should "require the :index argument" do assert_raise ArgumentError do subject.indices.delete_mapping :type => 'bar' end end should "require the :type argument" do assert_raise ArgumentError do subject.indices.delete_mapping :index => 'foo' end end should "perform correct request" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'DELETE', method assert_equal 'foo/bar', url assert_equal Hash.new, params assert_nil body true end.returns(FakeResponse.new) subject.indices.delete_mapping :index => 'foo', :type => 'bar' end should "perform request against multiple indices" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'foo,bar/baz', url true end.returns(FakeResponse.new) subject.indices.delete_mapping :index => ['foo','bar'], :type => 'baz' 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/delete_mapping_test.rb |
elasticsearch-api-0.0.2 | test/unit/indices/delete_mapping_test.rb |