OK, at this stage it's just an empty LuminusWeb project...
This commit is contained in:
commit
e455387f96
19 changed files with 547 additions and 0 deletions
15
test/mw_ui/test/handler.clj
Normal file
15
test/mw_ui/test/handler.clj
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
(ns mw-ui.test.handler
|
||||
(:use clojure.test
|
||||
ring.mock.request
|
||||
mw-ui.handler))
|
||||
|
||||
(deftest test-app
|
||||
(testing "main route"
|
||||
(let [response (app (request :get "/"))]
|
||||
(is (= (:status response) 200))
|
||||
(is (= (:body response)
|
||||
"<html>\n <head>\n <title>Welcome to mw-ui</title>\n <link href=\"/css/screen.css\" rel=\"stylesheet\" type=\"text/css\"></link>\n </head>\n <body>\n <div class=\"navbar navbar-fixed-top navbar-inverse\">\n <ul class=\"nav\">\n <li>\n <a href=\"/\">Home</a>\n </li>\n <li>\n <a href=\"/about\">About</a>\n </li>\n </ul>\n </div>\n <div id=\"content\">\n <h1>Welcome to mw-ui</h1>\n \n<h2>Some links to get started</h2><ol><li><a href='http://www.luminusweb.net/docs/html_templating.md'>HTML templating</a></li><li><a href='http://www.luminusweb.net/docs/database.md'>Accessing the database</a></li><li><a href='http://www.luminusweb.net/docs/static_resources.md'>Serving static resources</a></li><li><a href='http://www.luminusweb.net/docs/responses.md'>Setting response types</a></li><li><a href='http://www.luminusweb.net/docs/routes.md'>Defining routes</a></li><li><a href='http://www.luminusweb.net/docs/middleware.md'>Adding middleware</a></li><li><a href='http://www.luminusweb.net/docs/sessions_cookies.md'>Sessions and cookies</a></li><li><a href='http://www.luminusweb.net/docs/security.md'>Security</a></li><li><a href='http://www.luminusweb.net/docs/deployment.md'>Deploying the application</a></li></ol>\n\n </div> \n <footer>Copyright ...</footer>\n </body>\n</html>\n\n\n"))))
|
||||
|
||||
(testing "not-found route"
|
||||
(let [response (app (request :get "/invalid"))]
|
||||
(is (= (:status response) 404)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue