Initial commit

This commit is contained in:
Simon Brooke 2020-01-27 17:31:07 +00:00
commit 86c675f22d
42 changed files with 1407 additions and 0 deletions

View file

@ -0,0 +1,27 @@
(ns geocsv.test.handler
(:require
[clojure.test :refer :all]
[ring.mock.request :refer :all]
[geocsv.handler :refer :all]
[geocsv.middleware.formats :as formats]
[muuntaja.core :as m]
[mount.core :as mount]))
(defn parse-json [body]
(m/decode formats/instance "application/json" body))
(use-fixtures
:once
(fn [f]
(mount/start #'geocsv.config/env
#'geocsv.handler/app-routes)
(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))))))

View file

@ -0,0 +1,9 @@
(ns geocsv.core-test
(:require [cljs.test :refer-macros [is are deftest testing use-fixtures]]
[pjstadig.humane-test-output]
[reagent.core :as reagent :refer [atom]]
[geocsv.core :as rc]))
(deftest test-home
(is (= true true)))

View file

@ -0,0 +1,6 @@
(ns geocsv.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[geocsv.core-test]))
(doo-tests 'geocsv.core-test)