test/suggest_test.rb in searchkick-2.4.0 vs test/suggest_test.rb in searchkick-2.5.0
- old
+ new
@@ -66,16 +66,21 @@
store_names ["Great White Shark", "Hammerhead Shark", "Tiger Shark"]
assert_suggest "How Big is a Tigre Shar", "how big is a tiger shark", fields: [{"name^2" => :word_start}]
end
def test_multiple_models
+ skip # flaky test
store_names ["Great White Shark", "Hammerhead Shark", "Tiger Shark"]
assert_equal "how big is a tiger shark", Searchkick.search("How Big is a Tigre Shar", suggest: [:name], fields: [:name]).suggestions.first
end
def test_multiple_models_no_fields
store_names ["Great White Shark", "Hammerhead Shark", "Tiger Shark"]
assert_raises(ArgumentError) { Searchkick.search("How Big is a Tigre Shar", suggest: true) }
+ end
+
+ def test_star
+ assert_equal [], Product.search("*", suggest: true).suggestions
end
protected
def assert_suggest(term, expected, options = {})