Commit 93bf4367b60e5f25a50d40ff348047ea77e3610d

Authored by Andrew
1 parent 17c9adae

Fixed Gemfile and added more tests

Gemfile
... ... @@ -10,8 +10,6 @@ gem "typhoeus"
10 10 gem "activejob", "~> 5.2.0.rc1"
11 11 gem "redis"
12 12 gem "connection_pool"
13   -gem "faraday", path: "~/forks/faraday"
14   -gem "ethon", path: "~/forks/ethon"
15 13  
16 14 # kaminari
17 15 gem "actionpack", "~> 5.2.0.rc1"
... ...
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 &lt; 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
... ...