Solidify document permalink tests

This commit is contained in:
Alfred Xing 2014-07-07 10:39:22 -07:00
parent f830120044
commit a13a4ca532
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
---
title: Override permalink
layout: slide
permalink: /slide/3
permalink: /slide/3/
---

View File

@ -174,10 +174,16 @@ class TestDocument < Test::Unit::TestCase
}))
@site.process
@document = @site.collections["slides"].docs[2]
@dest_file = dest_dir("slide/3/index.html")
end
should "know its permalink" do
assert_equal @document.permalink, "/slide/3"
assert_equal "/slide/3/", @document.permalink
assert_equal "/slide/3/index.html", @document.url
end
should "be written to its permalink" do
assert File.exist?(@dest_file), "Can't find the rendered file in the dest_dir."
end
end