summaryrefslogtreecommitdiff
path: root/reify-health/test/reify
diff options
context:
space:
mode:
Diffstat (limited to 'reify-health/test/reify')
-rw-r--r--reify-health/test/reify/handler_test.clj14
1 files changed, 14 insertions, 0 deletions
diff --git a/reify-health/test/reify/handler_test.clj b/reify-health/test/reify/handler_test.clj
new file mode 100644
index 0000000..450d544
--- /dev/null
+++ b/reify-health/test/reify/handler_test.clj
@@ -0,0 +1,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)))))