Skip to content

Commit

Permalink
More fixes in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed Apr 6, 2023
1 parent 7662689 commit 39c51e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clpmfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@


;; (:asd "reblocks.asd")
;; (:asd "reblocks-test.asd")
;; (:asd "reblocks-tests.asd")

(:system "ironclad" :source "quicklisp")
14 changes: 7 additions & 7 deletions t/dependencies.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


(deftest creating-local-js-dependency
(let ((dependency (make-dependency #P"t/data/some.js" :system "reblocks-test")))
(let ((dependency (make-dependency #P"t/data/some.js" :system "reblocks-tests")))
(testing "method get-path should return a local pathname"
(ok (uiop:absolute-pathname-p (get-path dependency)))
(ok (ends-with-p "/t/data/some.js"
Expand All @@ -74,7 +74,7 @@
"Route should point to a same filename in a special root for static files."))))

(testing "Also, local dependency can be created using a string."
(let ((dependency (make-dependency "t/data/some.js" :system "reblocks-test")))
(let ((dependency (make-dependency "t/data/some.js" :system "reblocks-tests")))
(ok (uiop:absolute-pathname-p (get-path dependency)))
(ok (ends-with-p "/t/data/some.js"
(namestring (get-path dependency)))))))
Expand Down Expand Up @@ -147,7 +147,7 @@


(deftest render-css-dependency
(let ((dependency (make-dependency "t/data/some.css" :system "reblocks-test")))
(let ((dependency (make-dependency "t/data/some.css" :system "reblocks-tests")))
(is-html (render-in-head dependency)
"<link rel=stylesheet type=text/css href=/static/css/some.css media=screen>"
"Local CSS dependency should be rendered as a link tag."))
Expand All @@ -166,15 +166,15 @@


(deftest render-js-dependency
(let ((dependency (make-dependency "t/data/some.js" :system "reblocks-test")))
(let ((dependency (make-dependency "t/data/some.js" :system "reblocks-tests")))
(is-html (render-in-head dependency)
"<script src=/static/js/some.js type=text/javascript></script>"
"JS dependency should be rendered as a script tag.")))


(deftest dont-render-png-dependency
(testing "Png dependency should not be rendered"
(let ((dependency (make-dependency "t/data/lisp.png" :system "reblocks-test")))
(let ((dependency (make-dependency "t/data/lisp.png" :system "reblocks-tests")))
(is-html (render-in-head dependency)
""
"Methods render-in-header works only for js/css dependencies."))))
Expand All @@ -197,8 +197,8 @@
(deftest deduplication
(testing "Dependencies should be deduplicated on collection."
(with-collected-dependencies
(push-dependency (make-dependency #P"t/data/some.js" :system "reblocks-test"))
(push-dependency (make-dependency #P"t/data/some.js" :system "reblocks-test"))
(push-dependency (make-dependency #P"t/data/some.js" :system "reblocks-tests"))
(push-dependency (make-dependency #P"t/data/some.js" :system "reblocks-tests"))

(let ((collected (get-collected-dependencies)))
(ok (equal (length collected)
Expand Down

0 comments on commit 39c51e8

Please sign in to comment.