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
@@ -10,8 +10,6 @@ gem "typhoeus" | @@ -10,8 +10,6 @@ gem "typhoeus" | ||
10 | gem "activejob", "~> 5.2.0.rc1" | 10 | gem "activejob", "~> 5.2.0.rc1" |
11 | gem "redis" | 11 | gem "redis" |
12 | gem "connection_pool" | 12 | gem "connection_pool" |
13 | -gem "faraday", path: "~/forks/faraday" | ||
14 | -gem "ethon", path: "~/forks/ethon" | ||
15 | 13 | ||
16 | # kaminari | 14 | # kaminari |
17 | gem "actionpack", "~> 5.2.0.rc1" | 15 | gem "actionpack", "~> 5.2.0.rc1" |
test/highlight_test.rb
@@ -86,4 +86,9 @@ class HighlightTest < Minitest::Test | @@ -86,4 +86,9 @@ class HighlightTest < Minitest::Test | ||
86 | assert highlight.include?("<em>Cinema</em>") | 86 | assert highlight.include?("<em>Cinema</em>") |
87 | end | 87 | end |
88 | end | 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 | end | 94 | end |
test/marshal_test.rb
@@ -5,4 +5,9 @@ class MarshalTest < Minitest::Test | @@ -5,4 +5,9 @@ class MarshalTest < Minitest::Test | ||
5 | store_names ["Product A"] | 5 | store_names ["Product A"] |
6 | assert Marshal.dump(Product.search("*").results) | 6 | assert Marshal.dump(Product.search("*").results) |
7 | end | 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 | end | 13 | end |