Commit 93bf4367b60e5f25a50d40ff348047ea77e3610d
1 parent
17c9adae
Exists in
master
and in
18 other branches
Fixed Gemfile and added more tests
Showing
3 changed files
with
10 additions
and
2 deletions
Show diff stats
Gemfile
test/highlight_test.rb
... | ... | @@ -86,4 +86,9 @@ class HighlightTest < Minitest::Test |
86 | 86 | assert highlight.include?("<em>Cinema</em>") |
87 | 87 | end |
88 | 88 | end |
89 | + | |
90 | + def test_search_highlights_method | |
91 | + store_names ["Two Door Cinema Club"] | |
92 | + assert_equal "Two Door <em>Cinema</em> Club", Product.search("cinema", highlight: true).first.search_highlights[:name] | |
93 | + end | |
89 | 94 | end | ... | ... |
test/marshal_test.rb
... | ... | @@ -5,4 +5,9 @@ class MarshalTest < Minitest::Test |
5 | 5 | store_names ["Product A"] |
6 | 6 | assert Marshal.dump(Product.search("*").results) |
7 | 7 | end |
8 | + | |
9 | + def test_marshal_highlights | |
10 | + store_names ["Product A"] | |
11 | + assert Marshal.dump(Product.search("product", highlight: true, load: {dumpable: true}).results) | |
12 | + end | |
8 | 13 | end | ... | ... |