Fix test to simply ensure next is an object in jsonify
This commit is contained in:
parent
17d8c96a63
commit
f8c708ffec
|
@ -201,10 +201,9 @@ class TestFilters < JekyllUnitTest
|
||||||
should "convert drop to json" do
|
should "convert drop to json" do
|
||||||
@filter.site.read
|
@filter.site.read
|
||||||
expected = {
|
expected = {
|
||||||
"next" => "Categories _should_ work",
|
|
||||||
"path" => "_posts/2008-02-02-published.markdown",
|
"path" => "_posts/2008-02-02-published.markdown",
|
||||||
"output" => nil,
|
|
||||||
"previous" => nil,
|
"previous" => nil,
|
||||||
|
"output" => nil,
|
||||||
"content" => "This should be published.\n",
|
"content" => "This should be published.\n",
|
||||||
"id" => "/publish_test/2008/02/02/published",
|
"id" => "/publish_test/2008/02/02/published",
|
||||||
"url" => "/publish_test/2008/02/02/published.html",
|
"url" => "/publish_test/2008/02/02/published.html",
|
||||||
|
@ -223,8 +222,13 @@ class TestFilters < JekyllUnitTest
|
||||||
"ext" => ".markdown",
|
"ext" => ".markdown",
|
||||||
"tags" => []
|
"tags" => []
|
||||||
}
|
}
|
||||||
actual = @filter.jsonify(@filter.site.docs_to_write.first.to_liquid)
|
actual = JSON.parse(@filter.jsonify(@filter.site.docs_to_write.first.to_liquid))
|
||||||
assert_equal expected, JSON.parse(actual)
|
|
||||||
|
next_doc = actual.delete("next")
|
||||||
|
refute_nil next_doc
|
||||||
|
assert next_doc.is_a?(Hash), "doc.next should be an object"
|
||||||
|
|
||||||
|
assert_equal expected, actual
|
||||||
end
|
end
|
||||||
|
|
||||||
should "convert drop with drops to json" do
|
should "convert drop with drops to json" do
|
||||||
|
|
Loading…
Reference in New Issue