spec/units/search_spec.rb in es-elasticity-0.8.1 vs spec/units/search_spec.rb in es-elasticity-0.8.2

- old
+ new

@@ -107,11 +107,11 @@ expect(docs.aggregations).to eq aggregations end it "searches using scan&scroll" do expect(client).to receive(:search).with(index: index_name, type: document_type, body: body, search_type: :query_then_fetch, size: 100, scroll: "1m").and_return(scan_response) - expect(client).to receive(:scroll).with(scroll_id: "abc123", scroll: "1m").and_return(scroll_response) - expect(client).to receive(:scroll).with(scroll_id: "abc456", scroll: "1m").and_return(empty_response) + expect(client).to receive(:scroll).with(scroll_id: "abc123", scroll: "1m", body: { scroll_id: "abc123" }).and_return(scroll_response) + expect(client).to receive(:scroll).with(scroll_id: "abc456", scroll: "1m", body: { scroll_id: "abc456" }).and_return(empty_response) docs = subject.scan_documents(mapper) expected = [klass.new(_id: 1, name: "foo"), klass.new(_id: 2, name: "bar")] expect(docs.total).to eq 2