Last active
August 29, 2015 13:56
-
-
Save jah2488/8793357 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn project-link [project] | |
(when project [:h3 [:a {:href (str "/" (:permaname project) "/project/view")} (str "Project: " (:name project))]])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(it "returns a link when there is a project in the view context" | |
(let [project {:project {:name "foo" :permaname "bar"}} | |
link (nth (project-link project) 1)] | |
(should link) | |
(should= "/bar/project/view" (:href (nth link 1))) | |
(should-contain "Project: foo" link)))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment