test/test_post.rb in jekyll-1.0.0.beta3 vs test/test_post.rb in jekyll-1.0.0.beta4
- old
+ new
@@ -212,17 +212,40 @@
assert_equal "/:categories/:year/:month/:day/:title/", @post.template
assert_equal "/2008/09/09/foo-bar/", @post.url
end
end
+ context "with ordinal style" do
+ setup do
+ @post.site.permalink_style = :ordinal
+ @post.process(@fake_file)
+ end
+
+ should "process the url correctly" do
+ assert_equal "/:categories/:year/:y_day/:title.html", @post.template
+ assert_equal "/2008/253/foo-bar.html", @post.url
+ end
+ end
+
context "with custom date permalink" do
setup do
@post.site.permalink_style = '/:categories/:year/:i_month/:i_day/:title/'
@post.process(@fake_file)
end
should "process the url correctly" do
assert_equal "/2008/9/9/foo-bar/", @post.url
+ end
+ end
+
+ context "with custom abbreviated month date permalink" do
+ setup do
+ @post.site.permalink_style = '/:categories/:year/:short_month/:day/:title/'
+ @post.process(@fake_file)
+ end
+
+ should "process the url correctly" do
+ assert_equal "/2008/Sep/09/foo-bar/", @post.url
end
end
context "with prefix style and no extension" do
setup do