Test documents without a title
This commit is contained in:
parent
a5e51cfdbe
commit
be2b16507e
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
layout: slide
|
||||
---
|
||||
|
||||
Wooot
|
|
@ -207,7 +207,7 @@ class TestDocument < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
context "a document in a collection with custom title permalinks" do
|
||||
context "documents in a collection with custom title permalinks" do
|
||||
setup do
|
||||
@site = Site.new(Jekyll.configuration({
|
||||
"collections" => {
|
||||
|
@ -221,11 +221,16 @@ class TestDocument < Test::Unit::TestCase
|
|||
}))
|
||||
@site.process
|
||||
@document = @site.collections["slides"].docs[3]
|
||||
@document_without_title = @site.collections["slides"].docs[4]
|
||||
end
|
||||
|
||||
should "produce the right URL" do
|
||||
should "produce the right URL if they have a title" do
|
||||
assert_equal "/slides/so-what-is-jekyll-exactly", @document.url
|
||||
end
|
||||
|
||||
should "produce the right URL if they don't have a title" do
|
||||
assert_equal "/slides/example-slide-5", @document_without_title.url
|
||||
end
|
||||
end
|
||||
|
||||
context "a static file in a collection" do
|
||||
|
|
Loading…
Reference in New Issue