You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
458 B
14 lines
458 B
(ns blog-clj.handler-test
|
|
(:require [clojure.test :refer :all]
|
|
[ring.mock.request :as mock]
|
|
[blog-clj.handler :refer :all]))
|
|
|
|
(deftest test-app
|
|
(testing "main route"
|
|
(let [response (app (mock/request :get "/"))]
|
|
(is (= (:status response) 200))
|
|
(is (= (:body response) "Hello World"))))
|
|
|
|
(testing "not-found route"
|
|
(let [response (app (mock/request :get "/invalid"))]
|
|
(is (= (:status response) 404)))))
|
|
|