Commit 342879c9b9dd8de5258c01212fddc2a47b786540
1 parent
a3e6df35
Exists in
relation
and in
1 other branch
More tests [skip ci]
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
test/autocomplete_test.rb
... | ... | @@ -10,11 +10,13 @@ class AutocompleteTest < Minitest::Test |
10 | 10 | def test_autocomplete_two_words |
11 | 11 | store_names ["Organic Hummus"] |
12 | 12 | assert_search "hum", [], match: :text_start |
13 | + assert_search_relation [], Product.search("hum", relation: true).match(:text_start) | |
13 | 14 | end |
14 | 15 | |
15 | 16 | def test_autocomplete_fields |
16 | 17 | store_names ["Hummus"] |
17 | 18 | assert_search "hum", ["Hummus"], match: :text_start, fields: [:name] |
19 | + assert_search_relation ["Hummus"], Product.search("hum", relation: true).match(:text_start).fields(:name) | |
18 | 20 | end |
19 | 21 | |
20 | 22 | def test_text_start | ... | ... |