summaryrefslogtreecommitdiff
path: root/reify-health/test
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-03-17 13:14:53 -0700
committerBen Sima <ben@bsima.me>2018-03-17 13:14:53 -0700
commit66e6b47737a9e6411f430a5cd169315f04dcd078 (patch)
tree15ebb5ba14f22c52faf487a7a4bdcb7e54cf332e /reify-health/test
parentb48cd6640e4029b91d63c4f6a1843f953d4ff673 (diff)
Add reify health from yesterday
Diffstat (limited to 'reify-health/test')
-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)))))