Sha256: 7894f14e384ac6e06bb96b77ec246888c34472f5de451ea7a98bb16bb6cd7f6a
Contents?: true
Size: 1.17 KB
Versions: 77
Compression:
Stored size: 1.17 KB
Contents
require 'test_helper' module Elasticsearch module Test class MtermvectorsTest < ::Test::Unit::TestCase context "Mtermvectors" 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 'my-index/my-type/_mtermvectors', url assert_equal Hash.new, params assert_equal [1, 2, 3], body[:ids] true end.returns(FakeResponse.new) subject.mtermvectors :index => 'my-index', :type => 'my-type', :body => { :ids => [1, 2, 3] } end should "allow passing a list of IDs instead of the body" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'GET', method assert_equal 'my-index/my-type/_mtermvectors', url assert_equal Hash.new, params assert_equal [1, 2, 3], body[:ids] true end.returns(FakeResponse.new) subject.mtermvectors :index => 'my-index', :type => 'my-type', :ids => [1, 2, 3] end end end end end
Version data entries
77 entries across 77 versions & 6 rubygems