Commit 75eb2aeff00b851e7415693cd4250a99f50664f4
1 parent
90724820
Exists in
relation
and in
1 other branch
Updated test [skip ci]
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
test/highlight_test.rb
... | ... | @@ -50,6 +50,7 @@ class HighlightTest < Minitest::Test |
50 | 50 | def test_multiple_words |
51 | 51 | store_names ["Hello World Hello"] |
52 | 52 | assert_equal "<em>Hello</em> World <em>Hello</em>", Product.search("hello", highlight: true).highlights.first[:name] |
53 | + assert_equal "<em>Hello</em> World <em>Hello</em>", Product.search("hello", relation: true).highlight(true).highlights.first[:name] | |
53 | 54 | end |
54 | 55 | |
55 | 56 | def test_encoder |
... | ... | @@ -60,6 +61,7 @@ class HighlightTest < Minitest::Test |
60 | 61 | def test_word_middle |
61 | 62 | store_names ["Two Door Cinema Club"] |
62 | 63 | assert_equal "Two Door <em>Cinema</em> Club", Product.search("ine", match: :word_middle, highlight: true).highlights.first[:name] |
64 | + assert_equal "Two Door <em>Cinema</em> Club", Product.search("ine", relation: true).match(:word_middle).highlight(true).highlights.first[:name] | |
63 | 65 | end |
64 | 66 | |
65 | 67 | def test_body | ... | ... |