Add test for no directories

This commit is contained in:
Arsene Rei 2016-05-27 07:19:03 -07:00 committed by Carmen La
parent f383661e5e
commit 272d688010

View file

@ -99,6 +99,15 @@ and more content.
(is (.isDirectory (File. (str "resources/public/blog/" dir)))))) (is (.isDirectory (File. (str "resources/public/blog/" dir))))))
(deftest test-copy-resources-from-markup-folders (deftest test-copy-resources-from-markup-folders
(reset-resources)
(testing "No pages or posts nothing to copy"
(copy-resources-from-markup-folders
{:post-root "pages"
:page-root "posts"
:blog-prefix "/blog"})
(is (not (.isDirectory (File. (str "resources/public/blog/pages")))))
(is (not (.isDirectory (File. (str "resources/public/blog/posts"))))))
(reset-resources) (reset-resources)
(doseq [mu [(markdown) (asciidoc)]] (doseq [mu [(markdown) (asciidoc)]]
(testing (str "Test copy from markup folders (" (m/dir mu) ")") (testing (str "Test copy from markup folders (" (m/dir mu) ")")