Skip to content
Permalink
Browse files

Test where filter handling numeric property values (#7821)

Merge pull request 7821
  • Loading branch information
ashmaroli committed Feb 4, 2020
1 parent 4eb7a40 commit 5cc78db64881e7471904ece2c610e325a7413ab8
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/test_filters.rb
@@ -863,6 +863,17 @@ def to_liquid
assert_equal 2, @filter.where(array, "color", nil).length
end

should "filter objects with numerical properties appropriately" do
array = [
{ "value" => "555" },
{ "value" => 555 },
{ "value" => 24.625 },
{ "value" => "24.625" },
]
assert_equal 2, @filter.where(array, "value", 24.625).length
assert_equal 2, @filter.where(array, "value", 555).length
end

should "filter array properties appropriately" do
hash = {
"a" => { "tags"=>%w(x y) },

0 comments on commit 5cc78db

Please sign in to comment.
You can’t perform that action at this time.