Add test for new template
with mirror settings
This commit is contained in:
parent
5192dda1cc
commit
d9fa141629
1 changed files with 13 additions and 1 deletions
|
@ -58,6 +58,18 @@
|
||||||
(with-redefs [leiningen.new/resolve-remote-template (constantly false)]
|
(with-redefs [leiningen.new/resolve-remote-template (constantly false)]
|
||||||
(abort-msg leiningen.new/new nil "zzz" "my-zzz")))))
|
(abort-msg leiningen.new/new nil "zzz" "my-zzz")))))
|
||||||
|
|
||||||
|
(deftest test-new-with-nonexistent-template-in-mirrors
|
||||||
|
(is (nil?
|
||||||
|
(with-redefs
|
||||||
|
[leiningen.core.user/profiles
|
||||||
|
(constantly {:user
|
||||||
|
{:mirrors
|
||||||
|
{"clojars" "https://clojars.example.com"
|
||||||
|
"central" "http://central.exmaple.com"}}})]
|
||||||
|
(let [name "luminus"
|
||||||
|
sym (symbol (str "leiningen.new." name))]
|
||||||
|
(leiningen.new/resolve-remote-template name sym))))))
|
||||||
|
|
||||||
(deftest test-new-with-*-jure-project-name
|
(deftest test-new-with-*-jure-project-name
|
||||||
(is (re-find
|
(is (re-find
|
||||||
#"names such as clojure .* are not allowed"
|
#"names such as clojure .* are not allowed"
|
||||||
|
|
Loading…
Reference in a new issue