From e130a0841f2c0d074a0e43359a3a114f454e8b5c Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 3 Mar 2016 15:56:54 -0500 Subject: [PATCH] add test to ensure where doesn't match substrings --- test/test_filters.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_filters.rb b/test/test_filters.rb index 6eaff8f4..cb22ed87 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -316,6 +316,11 @@ class TestFilters < JekyllUnitTest assert_equal 2, @filter.where(hash, "tags", "x").length 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 hash = { "The Words" => {"rating" => 1.2, "featured" => false},