Commit 08b142e62771710abd09bc8eabd06bf98fe0f8f9
1 parent
c04b4911
Exists in
master
and in
15 other branches
Fixed deprecation warnings in tests
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
test/aggs_test.rb
... | ... | @@ -113,7 +113,7 @@ class AggsTest < Minitest::Test |
113 | 113 | products_per_year: { |
114 | 114 | date_histogram: { |
115 | 115 | field: :created_at, |
116 | - interval: :year | |
116 | + interval_key => :year | |
117 | 117 | } |
118 | 118 | } |
119 | 119 | } |
... | ... | @@ -241,7 +241,7 @@ class AggsTest < Minitest::Test |
241 | 241 | products_per_day: { |
242 | 242 | date_histogram: { |
243 | 243 | field: :created_at, |
244 | - interval: :day, | |
244 | + interval_key => :day, | |
245 | 245 | time_zone: time_zone |
246 | 246 | } |
247 | 247 | } |
... | ... | @@ -263,4 +263,8 @@ class AggsTest < Minitest::Test |
263 | 263 | [field, buckets_as_hash(filtered_agg)] |
264 | 264 | end] |
265 | 265 | end |
266 | + | |
267 | + def interval_key | |
268 | + Searchkick.server_below?("7.4.0") ? :interval : :calendar_interval | |
269 | + end | |
266 | 270 | end | ... | ... |