Sha256: 9b86eeb2110e824a3f5a9a93d7f75317907f5574381f6f9134c8fe4e11a30186
Contents?: true
Size: 1.32 KB
Versions: 77
Compression:
Stored size: 1.32 KB
Contents
require 'test_helper' module Elasticsearch module Test class IndicesGetFieldMappingTest < ::Test::Unit::TestCase context "Indices: Get field mapping" 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 '_mapping/field/foo', url assert_equal Hash.new, params assert_nil body true end.returns(FakeResponse.new) subject.indices.get_field_mapping :field => 'foo' end should "perform request against an index" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'foo/_mapping/field/bam', url true end.returns(FakeResponse.new) subject.indices.get_field_mapping :index => 'foo', :field => 'bam' end should "perform request against an index and type" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'foo/_mapping/bar/field/bam', url true end.returns(FakeResponse.new) subject.indices.get_field_mapping :index => 'foo', :type => 'bar', :field => 'bam' end end end end end
Version data entries
77 entries across 77 versions & 6 rubygems