mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 09:05:13 -07:00
Improve where filter tests (#1472)
This commit is contained in:
@@ -770,6 +770,18 @@ class StandardFiltersTest < Minitest::Test
|
|||||||
assert_equal(expectation, @filters.where(input, "ok"))
|
assert_equal(expectation, @filters.where(input, "ok"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_where_string_keys
|
||||||
|
input = [
|
||||||
|
"alpha", "beta", "gamma", "delta"
|
||||||
|
]
|
||||||
|
|
||||||
|
expectation = [
|
||||||
|
"beta",
|
||||||
|
]
|
||||||
|
|
||||||
|
assert_equal(expectation, @filters.where(input, "be"))
|
||||||
|
end
|
||||||
|
|
||||||
def test_where_no_key_set
|
def test_where_no_key_set
|
||||||
input = [
|
input = [
|
||||||
{ "handle" => "alpha", "ok" => true },
|
{ "handle" => "alpha", "ok" => true },
|
||||||
|
|||||||
Reference in New Issue
Block a user