blob: 450d544eeedb6168fd7c758c55569a728ccad1c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
(ns reify.handler-test
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[reify.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)))))
|