Permalink
Browse files

Fixed deprecation warnings in tests [skip ci]

  • Loading branch information...
ankane committed Sep 12, 2018
1 parent 6fe7e60 commit 62892244f925011ccf12313a81e9d63d0a515cf5
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/aggs_test.rb
View
@@ -20,7 +20,8 @@ def test_where
end
def test_order
agg = Product.search("Product", aggs: {color: {order: {"_term" => "desc"}}}).aggs["color"]
order_key = Searchkick.server_below?("6.0") ? "_term" : "_key"
agg = Product.search("Product", aggs: {color: {order: {order_key => "desc"}}}).aggs["color"]
assert_equal %w(red green blue), agg["buckets"].map { |b| b["key"] }
end

0 comments on commit 6289224

Please sign in to comment.