Sha256: 32e987894402d264c132e3d37dddb062745cc14f36bb4f97e3f5eb45d7b4f351
Contents?: true
Size: 1.05 KB
Versions: 42
Compression:
Stored size: 1.05 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/abc123', url assert_equal nil, params[:scroll_id] assert_equal nil, 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/abc123,def456', url assert_equal nil, params[:scroll_id] assert_equal nil, body true end.returns(FakeResponse.new) subject.clear_scroll :scroll_id => ['abc123', 'def456'] end end end end end
Version data entries
42 entries across 42 versions & 6 rubygems