test/highlight_test.rb in searchkick-1.5.0 vs test/highlight_test.rb in searchkick-1.5.1

- old
+ new

@@ -39,14 +39,14 @@ def test_encoder store_names ["<b>Hello</b>"] assert_equal "&lt;b&gt;<em>Hello</em>&lt;&#x2F;b&gt;", Product.search("hello", fields: [:name], highlight: {encoder: "html"}, misspellings: false).with_details.first[1][:highlight][:name] end - def test_json + def test_body skip if ENV["MATCH"] == "word_start" store_names ["Two Door Cinema Club"] - json = { + body = { query: { match: { "name.analyzed" => "cinema" } }, @@ -56,8 +56,8 @@ fields: { "name.analyzed" => {} } } } - assert_equal "Two Door <strong>Cinema</strong> Club", Product.search(json: json).with_details.first[1][:highlight][:"name.analyzed"] + assert_equal "Two Door <strong>Cinema</strong> Club", Product.search(body: body).with_details.first[1][:highlight][:"name.analyzed"] end end