add test to ensure where doesn't match substrings
This commit is contained in:
parent
f5f8548eb8
commit
e130a0841f
|
@ -316,6 +316,11 @@ class TestFilters < JekyllUnitTest
|
||||||
assert_equal 2, @filter.where(hash, "tags", "x").length
|
assert_equal 2, @filter.where(hash, "tags", "x").length
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "not match substrings" do
|
||||||
|
hash = {"a"=>{"category"=>"bear"}, "b"=>{"category"=>"wolf"}, "c"=>{"category"=>["bear","lion"]}}
|
||||||
|
assert_equal 0, @filter.where(hash, "category", "ear").length
|
||||||
|
end
|
||||||
|
|
||||||
should "stringify during comparison for compatibility with liquid parsing" do
|
should "stringify during comparison for compatibility with liquid parsing" do
|
||||||
hash = {
|
hash = {
|
||||||
"The Words" => {"rating" => 1.2, "featured" => false},
|
"The Words" => {"rating" => 1.2, "featured" => false},
|
||||||
|
|
Loading…
Reference in New Issue