From f29884593b41666066eb1d38f0833c1d185e544a Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Wed, 6 Aug 2014 16:05:53 -0700 Subject: [PATCH] Reverted deleted test and modified ensure subdirs are ignored. --- test/test_post.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/test_post.rb b/test/test_post.rb index 28c6366b..ff8953d5 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -76,6 +76,19 @@ class TestPost < Test::Unit::TestCase assert_equal "/2008/09/09/foo-bar", @post.id end + should "ignore subfolders" do + post = Post.allocate + post.site = @site + post.process("cat1/2008-09-09-foo-bar.textile") + assert_equal 0, post.categories.size + + post = Post.allocate + post.site = @site + post.process("cat2/CAT3/2008-09-09-foo-bar.textile") + assert_equal 0, post.categories.size + + end + should "create url based on date and title" do @post.categories = [] @post.process(@fake_file)