add tests for find-route-by name

This commit is contained in:
Valentin Boettcher 2019-09-30 13:21:32 +02:00
parent 4399e05cad
commit af873ac81e

View file

@ -21,6 +21,14 @@
(is (find-route *mapper* "/" :method :POST) nil)
(is (dispatch *mapper* "/" :method :GET) "Hello, World!")
(connect *mapper* "/"
(lambda (params)
(declare (ignore params))
"Hello, World!")
:name :test)
(ok (find-route-by-name *mapper* :test))
(is (find-route-by-name *mapper* :test) (find-route *mapper* "/" :name :test))
(connect *mapper* "/post"
(lambda (params)
(declare (ignore params))