diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-17 13:55:55 -0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-17 13:55:55 -0200 |
commit | 98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa (patch) | |
tree | 61f453e1b21634e0f2d740ff61091d182e145184 /test/clj/queue_api | |
download | queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.tar.gz queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.tar.bz2 queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.zip |
Initial commit
Diffstat (limited to 'test/clj/queue_api')
-rw-r--r-- | test/clj/queue_api/test/handler.clj | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/clj/queue_api/test/handler.clj b/test/clj/queue_api/test/handler.clj new file mode 100644 index 0000000..1aceb3c --- /dev/null +++ b/test/clj/queue_api/test/handler.clj @@ -0,0 +1,21 @@ +(ns queue-api.test.handler + (:require [clojure.test :refer :all] + [ring.mock.request :refer :all] + [queue-api.handler :refer :all] + [mount.core :as mount])) + +(use-fixtures + :once + (fn [f] + (mount/start #'queue-api.config/env + #'queue-api.handler/app) + (f))) + +(deftest test-app + (testing "main route" + (let [response (app (request :get "/"))] + (is (= 200 (:status response))))) + + (testing "not-found route" + (let [response (app (request :get "/invalid"))] + (is (= 404 (:status response)))))) |