Sha256: 6979de77cf717016c9a6d5a240e53eb61f5e902deece4c99acbd4bf480b783e2
Contents?: true
Size: 1.27 KB
Versions: 75
Compression:
Stored size: 1.27 KB
Contents
require 'test_helper' module Elasticsearch module Test class NodesShutdownTest < ::Test::Unit::TestCase context "Nodes: Shutdown" 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/nodes/_shutdown', url assert_equal Hash.new, params assert_nil body true end.returns(FakeResponse.new) subject.nodes.shutdown end should "send :node_id correctly" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal '_cluster/nodes/foo/_shutdown', url true end.returns(FakeResponse.new) subject.nodes.shutdown :node_id => 'foo' end should "send multiple :node_id-s correctly" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal '_cluster/nodes/A,B,C/_shutdown', url true end.returns(FakeResponse.new).twice subject.nodes.shutdown :node_id => 'A,B,C' subject.nodes.shutdown :node_id => ['A', 'B', 'C'] end end end end end
Version data entries
75 entries across 75 versions & 6 rubygems