diff --git a/test/test_document.rb b/test/test_document.rb index 68ca8d92..2899325e 100644 --- a/test/test_document.rb +++ b/test/test_document.rb @@ -186,7 +186,7 @@ class TestDocument < Test::Unit::TestCase end end - context "a document in a collection with custom permalinks" do + context "a document in a collection with custom filename permalinks" do setup do @site = Site.new(Jekyll.configuration({ "collections" => { @@ -207,6 +207,27 @@ class TestDocument < Test::Unit::TestCase end end + context "a document in a collection with custom title permalinks" do + setup do + @site = Site.new(Jekyll.configuration({ + "collections" => { + "slides" => { + "output" => true, + "permalink" => "/slides/test/:title" + } + }, + "source" => source_dir, + "destination" => dest_dir + })) + @site.process + @document = @site.collections["slides"].docs[0] + end + + should "produce the right URL" do + assert_equal "/slides/test/example-slide", @document.url + end + end + context "a static file in a collection" do setup do @site = Site.new(Jekyll.configuration({