mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
Test documents without a title
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user