Use clack.test:localhost to test a lack app.

This commit is contained in:
Eitaro Fukamachi 2018-01-09 17:21:17 +09:00
parent ac7e7eff66
commit e98d629115

View file

@ -56,14 +56,14 @@
`(200 nil (,(gethash "filename"
(third (assoc "file" (request-body-parameters (make-request env)) :test #'string=))))))
(multiple-value-bind (body status)
(dex:post "http://localhost:4242/"
(dex:post (localhost)
:content
`(("file" . ,(asdf:system-relative-pathname :lack #P"data/jellyfish.jpg"))))
(is status 200)
(is body "jellyfish.jpg"))
(multiple-value-bind (body status)
(dex:post "http://localhost:4242/"
(dex:post (localhost)
:content
`(("file" . ,(asdf:system-relative-pathname :lack #P"data/jellyfish.jpg"))))
(is status 200)