Sha256: c789e3e34296b5702419b72c07a16a656880f8689636880cd8b178d3a60f8965
Contents?: true
Size: 1.11 KB
Versions: 90
Compression:
Stored size: 1.11 KB
Contents
require 'test_helper' module Elasticsearch module Test class ClusterRerouteTest < ::Test::Unit::TestCase context "Cluster: Reroute" do subject { FakeClient.new } should "perform correct request" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'POST', method assert_equal '_cluster/reroute', url assert_equal Hash.new, params assert_equal Hash.new, body true end.returns(FakeResponse.new) subject.cluster.reroute end should "send the body" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'POST', method assert_equal '_cluster/reroute', url assert_equal Hash.new, params assert_equal({:commands => [ :move => { :index => 'myindex', :shard => 0 } ]}, body) true end.returns(FakeResponse.new) subject.cluster.reroute :body => { :commands => [ :move => { :index => 'myindex', :shard => 0 } ] } end end end end end
Version data entries
90 entries across 90 versions & 6 rubygems