use sut instea of code duplication

This commit is contained in:
jem 2020-01-20 21:01:37 +01:00
parent 3d5bf40f99
commit 02598f1078

View file

@ -21,8 +21,6 @@
(def target "target/tmp") (def target "target/tmp")
(def NoLinkOption (into-array [LinkOption/NOFOLLOW_LINKS]))
; TODO: Fix this test! ; TODO: Fix this test!
(deftest test-file-from-cp (deftest test-file-from-cp
(is (is
@ -37,12 +35,12 @@
(sut/resource-from-cp-or-fs (sut/resource-from-cp-or-fs
"./test-resources" "./test-resources"
"templates/themes/bootstrap4-test" "templates/themes/bootstrap4-test"
"js")) NoLinkOption)) "js")) sut/no-link-option))
(is (is
(Files/exists (Files/exists
(:java-path (:java-path
(sut/resource-from-cp-or-fs (sut/resource-from-cp-or-fs
"./" "" ".gitkeep")) NoLinkOption)) "./" "" ".gitkeep")) sut/no-link-option))
(is (is
(some? (sut/resource-from-cp-or-fs (some? (sut/resource-from-cp-or-fs
"./test-resources" "./test-resources"