From c6dcf3e714a2fe189a0b54c45efcd9cc29e49f50 Mon Sep 17 00:00:00 2001 From: Marco Concetto Rudilosso Date: Wed, 2 Apr 2025 15:09:28 +0200 Subject: [PATCH] add test --- test/integration/standard_filter_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/integration/standard_filter_test.rb b/test/integration/standard_filter_test.rb index 62ec5d2d..6a2737bb 100644 --- a/test/integration/standard_filter_test.rb +++ b/test/integration/standard_filter_test.rb @@ -1109,6 +1109,19 @@ class StandardFiltersTest < Minitest::Test assert_template_result(expected_output, template, { "array" => array }) end + def test_where_with_non_string_property + array = [ + { "handle" => "alpha", "{}" => true }, + { "handle" => "beta", "{}" => false }, + { "handle" => "gamma", "{}" => false }, + { "handle" => "delta", "{}" => true }, + ] + template = "{{ array | where: some_property, true | map: 'handle' | join: ' ' }}" + expected_output = "alpha delta" + + assert_template_result(expected_output, template, { "array" => array, "some_property" => {} }) + end + def test_where_string_keys input = [ "alpha", "beta", "gamma", "delta"