Set categor[y|ies] on post if they appear in site frontmatter defaults

This commit is contained in:
Terry Schmidt
2014-05-09 13:34:13 -05:00
parent 6c22ae3759
commit 0371b69952
5 changed files with 81 additions and 10 deletions

View File

@@ -15,9 +15,9 @@ class TestUtils < Test::Unit::TestCase
assert_equal [], Utils.pluralized_array_from_hash(data, 'tag', 'tags')
end
should "return empty array with matching nil singular" do
should "return plural array with nil singular" do
data = { 'foo' => 'bar', 'tag' => nil, 'tags' => ['dog', 'cat'] }
assert_equal [], Utils.pluralized_array_from_hash(data, 'tag', 'tags')
assert_equal ['dog', 'cat'], Utils.pluralized_array_from_hash(data, 'tag', 'tags')
end
should "return single value array with matching singular" do