Skip to content

Commit b788666

Browse files
committed
Improved smart_aggs test
1 parent c9e3676 commit b788666

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/aggs_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ def test_smart_aggs
156156

157157
assert_aggs ({"store_id" => {1 => 1}}), where: {or: [[{in_stock: true}]]}, aggs: [:store_id]
158158
assert_aggs ({"store_id" => {1 => 1, 2 => 2}}), where: {or: [[{in_stock: true}]]}, aggs: [:store_id], smart_aggs: false
159+
160+
assert_aggs ({"store_id" => {1 => 1}}), where: {_script: Searchkick.script("doc['in_stock'].value")}, aggs: [:store_id]
161+
assert_aggs ({"store_id" => {1 => 1, 2 => 2}}), where: {_script: Searchkick.script("doc['in_stock'].value")}, aggs: [:store_id], smart_aggs: false
159162
end
160163

161164
def test_smart_aggs_overlap

0 commit comments

Comments
 (0)