Commit 8adf6ac1d8b46ca0078de89373bfa3229f90c713

Authored by Andrew
1 parent 8715ef62

Test with_highlights

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
test/highlight_test.rb
... ... @@ -6,6 +6,11 @@ class HighlightTest < Minitest::Test
6 6 assert_equal "Two Door <em>Cinema</em> Club", Product.search("cinema", highlight: true).highlights.first[:name]
7 7 end
8 8  
  9 + def test_with_highlights
  10 + store_names ["Two Door Cinema Club"]
  11 + assert_equal "Two Door <em>Cinema</em> Club", Product.search("cinema", highlight: true).with_highlights.first.last[:name]
  12 + end
  13 +
9 14 def test_tag
10 15 store_names ["Two Door Cinema Club"]
11 16 assert_equal "Two Door <strong>Cinema</strong> Club", Product.search("cinema", highlight: {tag: "<strong>"}).highlights.first[:name]
... ...