test/unit/searching_test.rb in elasticsearch-model-0.1.0.rc1 vs test/unit/searching_test.rb in elasticsearch-model-0.1.0
- old
+ new
@@ -21,13 +21,14 @@
should "initialize the search object" do
Elasticsearch::Model::Searching::SearchRequest
.expects(:new).with do |klass, query, options|
assert_equal DummySearchingModel, klass
assert_equal 'foo', query
+ assert_equal({default_operator: 'AND'}, options)
end
.returns( stub('search') )
- DummySearchingModel.search 'foo'
+ DummySearchingModel.search 'foo', default_operator: 'AND'
end
should "not execute the search" do
Elasticsearch::Model::Searching::SearchRequest
.expects(:new).returns( mock('search').expects(:execute!).never )