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