[netpyoung/cljpyoung.address-plate "0.1.0"]
(require '[cljpyoung.address-plate :as address-plate])
(deftest simple-route
(address-plate/reset!)
(route hello)
(defn hello [message] (str "hello-" message))
(route world)
(defn world [message] message)
(testing "dispatch-by-key"
(is (= "hello-message"
(dispatch! "message" :key :hello))))
(testing "dispatch-by-key-fn"
(is (= "message"
(dispatch! "message" :key-fn (constantly :world))))))
Copyright © 2018 netpyoung
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close