Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
seejohnrun committed May 30, 2011
1 parent 55ed240 commit 1fcfec1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/unit/search_query_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ class QueryTest < Test::Unit::TestCase
Query.new.string('foo', :default_field => 'title') )
end

should "allow set default operator when searching with a query string" do
assert_equal( { :query_string => { :query => 'foo', :default_operator => 'and' } },
Query.new.string('foo', :default_operator => 'and') )
end

should "search for all documents" do
assert_equal( { :match_all => { } }, Query.new.all )
end
Expand Down

0 comments on commit 1fcfec1

Please sign in to comment.