From ce798a59560652b92c55c8dc5a410fdc04a4fd7e Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Thu, 17 Jan 2013 21:57:21 -0500 Subject: [PATCH] Added test for all-String categories. --- test/test_post.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_post.rb b/test/test_post.rb index 16aff4f1..582fc80c 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -128,6 +128,18 @@ class TestPost < Test::Unit::TestCase end end + context "with unspecified (date) style and a numeric category" do + setup do + @post.categories << 2013 + @post.process(@fake_file) + end + + should "process the url correctly" do + assert_equal "/:categories/:year/:month/:day/:title.html", @post.template + assert_equal "/2013/2008/09/09/foo-bar.html", @post.url + end + end + context "with unspecified layout" do setup do file = '2013-01-12-no-layout.textile'