Commit 2142c8be0f06abdcd5196268c8f735060f3b0f9b
1 parent
b28da463
Exists in
master
and in
19 other branches
Test word_middle highlight - #842
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
test/highlight_test.rb
... | ... | @@ -46,6 +46,11 @@ class HighlightTest < Minitest::Test |
46 | 46 | assert_equal "<b><em>Hello</em></b>", Product.search("hello", fields: [:name], highlight: {encoder: "html"}, misspellings: false).first.search_highlights[:name] |
47 | 47 | end |
48 | 48 | |
49 | + def test_word_middle | |
50 | + store_names ["Two Door Cinema Club"] | |
51 | + assert_equal "Two Door <em>Cinema</em> Club", Product.search("ine", fields: [:name], match: :word_middle, highlight: true).first.search_highlights[:name] | |
52 | + end | |
53 | + | |
49 | 54 | def test_body |
50 | 55 | skip if ENV["MATCH"] == "word_start" |
51 | 56 | store_names ["Two Door Cinema Club"] | ... | ... |