Sha256: 5b6b2cc1851e219847a893e3b842fd341639c8df35bd78dd1ec5f556cba2823b
Contents?: true
Size: 1.04 KB
Versions: 27
Compression:
Stored size: 1.04 KB
Contents
require 'test_helper' module Elasticsearch module Test class ClearScrollTest < ::Test::Unit::TestCase context "Clear scroll" do subject { FakeClient.new } should "perform correct request" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'DELETE', method assert_equal '_search/scroll', url assert_equal Hash.new, params assert_equal 'abc123', body true end.returns(FakeResponse.new) subject.clear_scroll :scroll_id => 'abc123' end should "listify scroll IDs" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'DELETE', method assert_equal '_search/scroll', url assert_equal Hash.new, params assert_equal 'abc123,def456', body true end.returns(FakeResponse.new) subject.clear_scroll :scroll_id => ['abc123', 'def456'] end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems