diff --git a/test/source/_slides/example-slide-5.html b/test/source/_slides/example-slide-5.html new file mode 100644 index 00000000..622df123 --- /dev/null +++ b/test/source/_slides/example-slide-5.html @@ -0,0 +1,5 @@ +--- + layout: slide +--- + +Wooot diff --git a/test/test_document.rb b/test/test_document.rb index 1ffc5431..5e26173f 100644 --- a/test/test_document.rb +++ b/test/test_document.rb @@ -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