Add test for set-routes
This commit is contained in:
parent
234b2e50f3
commit
7641ec5f61
10 changed files with 115 additions and 9 deletions
tests/routes
8
tests/routes/hello.lisp
Normal file
8
tests/routes/hello.lisp
Normal file
|
@ -0,0 +1,8 @@
|
|||
(defpackage #:ningle-fbr-test/routes/hello
|
||||
(:use #:cl)
|
||||
(:export #:handle-get))
|
||||
(in-package #:ningle-fbr-test/routes/hello)
|
||||
|
||||
(defun handle-get (params)
|
||||
(declare (ignore params))
|
||||
"ok")
|
8
tests/routes/index.lisp
Normal file
8
tests/routes/index.lisp
Normal file
|
@ -0,0 +1,8 @@
|
|||
(defpackage #:ningle-fbr-test/routes/index
|
||||
(:use #:cl)
|
||||
(:export #:handle-get))
|
||||
(in-package #:ningle-fbr-test/routes/index)
|
||||
|
||||
(defun handle-get (params)
|
||||
(declare (ignore params))
|
||||
"ok")
|
8
tests/routes/nested/page.lisp
Normal file
8
tests/routes/nested/page.lisp
Normal file
|
@ -0,0 +1,8 @@
|
|||
(defpackage #:ningle-fbr-test/routes/nested/page
|
||||
(:use #:cl)
|
||||
(:export #:handle-get))
|
||||
(in-package #:ningle-fbr-test/routes/nested/page)
|
||||
|
||||
(defun handle-get (params)
|
||||
(declare (ignore params))
|
||||
"ok")
|
11
tests/routes/not-found.lisp
Normal file
11
tests/routes/not-found.lisp
Normal file
|
@ -0,0 +1,11 @@
|
|||
(defpackage #:ningle-fbr-test/routes/not-found
|
||||
(:use #:cl)
|
||||
(:import-from #:lack/response)
|
||||
(:import-from #:ningle)
|
||||
(:export #:handle-not-found))
|
||||
(in-package #:ningle-fbr-test/routes/not-found)
|
||||
|
||||
(defun handle-not-found ()
|
||||
(setf (lack/response:response-status ningle:*response*)
|
||||
404)
|
||||
"Not Found")
|
8
tests/routes/users/<id>.lisp
Normal file
8
tests/routes/users/<id>.lisp
Normal file
|
@ -0,0 +1,8 @@
|
|||
(defpackage #:ningle-fbr-test/routes/users/<id>
|
||||
(:use #:cl)
|
||||
(:export #:handle-get))
|
||||
(in-package #:ningle-fbr-test/routes/users/<id>)
|
||||
|
||||
(defun handle-get (params)
|
||||
(let ((id (cdr (assoc :id params))))
|
||||
id))
|
8
tests/routes/users/index.lisp
Normal file
8
tests/routes/users/index.lisp
Normal file
|
@ -0,0 +1,8 @@
|
|||
(defpackage #:ningle-fbr-test/routes/users/index
|
||||
(:use #:cl)
|
||||
(:export #:handle-get))
|
||||
(in-package #:ningle-fbr-test/routes/users/index)
|
||||
|
||||
(defun handle-get (params)
|
||||
(declare (ignore params))
|
||||
"ok")
|
Loading…
Add table
Add a link
Reference in a new issue