Commit f6f6b16d0c97cb2439892d783d7540a3ecf4bfce

Authored by Andrew Kane
1 parent 8cbc20d4

Improved test output

Showing 2 changed files with 9 additions and 2 deletions   Show diff stats
test/order_test.rb
... ... @@ -22,7 +22,9 @@ class OrderTest < Minitest::Test
22 22 _, stderr = capture_io do
23 23 assert_order "product", [product_a, product_b].sort_by { |r| r.id.to_s }.map(&:name), order: {id: :asc}
24 24 end
25   - assert_match "Loading the fielddata on the _id field is deprecated", stderr
  25 + unless Searchkick.server_below?("7.6.0")
  26 + assert_match "Loading the fielddata on the _id field is deprecated", stderr
  27 + end
26 28 end
27 29  
28 30 def test_multiple
... ...
test/where_test.rb
... ... @@ -291,7 +291,12 @@ class WhereTest < Minitest::Test
291 291 {lat: 27.122789, lon: -94.125535},
292 292 {lat: 27.12278, lon: -125.496146}
293 293 ]
294   - assert_search "san", ["San Francisco", "San Antonio"], where: {location: {geo_polygon: {points: polygon}}}
  294 + _, stderr = capture_io do
  295 + assert_search "san", ["San Francisco", "San Antonio"], where: {location: {geo_polygon: {points: polygon}}}
  296 + end
  297 + unless Searchkick.server_below?("7.12.0")
  298 + assert_match "Deprecated field [geo_polygon] used", stderr
  299 + end
295 300 end
296 301  
297 302 def test_top_left_bottom_right
... ...