mirror of
https://github.com/vale981/myway
synced 2025-03-04 17:31:41 -05:00
add tests for find-route-by name
This commit is contained in:
parent
4399e05cad
commit
af873ac81e
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,14 @@
|
||||||
(is (find-route *mapper* "/" :method :POST) nil)
|
(is (find-route *mapper* "/" :method :POST) nil)
|
||||||
(is (dispatch *mapper* "/" :method :GET) "Hello, World!")
|
(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"
|
(connect *mapper* "/post"
|
||||||
(lambda (params)
|
(lambda (params)
|
||||||
(declare (ignore params))
|
(declare (ignore params))
|
||||||
|
|
Loading…
Add table
Reference in a new issue