Commit 85fc546d114ac42d1c117fa70859e5a5751b0a66
1 parent
a70c435b
Exists in
master
and in
19 other branches
Added test for no fields [skip ci]
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
test/suggest_test.rb
... | ... | @@ -72,6 +72,11 @@ class SuggestTest < Minitest::Test |
72 | 72 | assert_equal "how big is a tiger shark", Searchkick.search("How Big is a Tigre Shar", suggest: [:name]).suggestions.first |
73 | 73 | end |
74 | 74 | |
75 | + def test_multiple_models_no_fields | |
76 | + store_names ["Great White Shark", "Hammerhead Shark", "Tiger Shark"] | |
77 | + assert_raises(ArgumentError) { Searchkick.search("How Big is a Tigre Shar", suggest: true) } | |
78 | + end | |
79 | + | |
75 | 80 | protected |
76 | 81 | |
77 | 82 | def assert_suggest(term, expected, options = {}) | ... | ... |