From 66e6b47737a9e6411f430a5cd169315f04dcd078 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 17 Mar 2018 13:14:53 -0700 Subject: Add reify health from yesterday --- reify-health/test/reify/handler_test.clj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 reify-health/test/reify/handler_test.clj (limited to 'reify-health/test') 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))))) -- cgit v1.2.3