From 87d7e2e3c9120239f87166e28a60abfdac50d749 Mon Sep 17 00:00:00 2001 From: tjalkane <1162417+Koura@users.noreply.github.com> Date: Fri, 26 Jun 2020 00:16:06 +0300 Subject: [PATCH 1/2] Fix: rename a test to make it run The renamed test is redeclared later in the same namespace causing the original one to not be run with `lein test`. --- test/clj/reitit/http_test.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/clj/reitit/http_test.clj b/test/clj/reitit/http_test.clj index 766d8dc7..27e28b6f 100644 --- a/test/clj/reitit/http_test.clj +++ b/test/clj/reitit/http_test.clj @@ -171,7 +171,7 @@ (testing "handler rejects" (is (= -406 (:status (app {:request-method :get, :uri "/pong"})))))))))) -(deftest default-options-handler-test +(deftest deprecated-default-options-handler-test (testing "Assertion fails when using deprecated options-handler" (is (thrown? ExceptionInfo (ring/router [] {::ring/default-options-handler (fn [_])}))))) From c1c3cd26b4386ea9896245716403ac44ebc75a41 Mon Sep 17 00:00:00 2001 From: tjalkane <1162417+Koura@users.noreply.github.com> Date: Fri, 26 Jun 2020 00:25:09 +0300 Subject: [PATCH 2/2] Remove duplicate require of schema.core --- test/cljc/reitit/swagger_test.clj | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/cljc/reitit/swagger_test.clj b/test/cljc/reitit/swagger_test.clj index a90296e9..b87c695c 100644 --- a/test/cljc/reitit/swagger_test.clj +++ b/test/cljc/reitit/swagger_test.clj @@ -7,7 +7,6 @@ [reitit.coercion.spec :as spec] [reitit.coercion.malli :as malli] [reitit.coercion.schema :as schema] - [schema.core :refer [Int]] [muuntaja.core :as m] [spec-tools.data-spec :as ds] [schema.core :as s])) @@ -77,11 +76,11 @@ ["/schema" {:coercion schema/coercion} ["/plus/*z" {:get {:summary "plus" - :parameters {:query {:x Int, :y Int} - :path {:z Int}} + :parameters {:query {:x s/Int, :y s/Int} + :path {:z s/Int}} :swagger {:responses {400 {:schema {:type "string"} :description "kosh"}}} - :responses {200 {:body {:total Int}} + :responses {200 {:body {:total s/Int}} 500 {:description "fail"}} :handler (fn [{{{:keys [x y]} :query {:keys [z]} :path} :parameters}]