mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
Unit tests are simple
This commit is contained in:
@@ -21,12 +21,12 @@ class TestExcerpt < Test::Unit::TestCase
|
||||
|
||||
context "#to_liquid" do
|
||||
should "contain the proper page data to mimick the post liquid" do
|
||||
assert_equal "", @excerpt.to_liquid
|
||||
assert_equal "Post Excerpt with Layout", @excerpt.to_liquid["title"]
|
||||
assert_equal "/jekyll/excerpt/blah/2013/07/22/post-excerpt-with-layout.html", @excerpt.to_liquid["url"]
|
||||
assert_equal "/bar/baz/z_category/2013/07/22/post-excerpt-with-layout.html", @excerpt.to_liquid["url"]
|
||||
assert_equal Time.new(2013, 07, 22), @excerpt.to_liquid["date"]
|
||||
assert_equal %w[jekyll excerpt blah], @excerpt.to_liquid["categories"]
|
||||
assert_equal %w[bar baz z_category], @excerpt.to_liquid["categories"]
|
||||
assert_equal %w[first second third jekyllrb.com], @excerpt.to_liquid["tags"]
|
||||
assert_equal "_posts/2013-07-22-post-excerpt-with-layout.markdown", @excerpt.to_liquid["path"]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user