diff --git a/test/cljc/reitit/ring_coercion_test.cljc b/test/cljc/reitit/ring_coercion_test.cljc index 14db797b..10fbb1f2 100644 --- a/test/cljc/reitit/ring_coercion_test.cljc +++ b/test/cljc/reitit/ring_coercion_test.cljc @@ -585,7 +585,7 @@ (is (= {:status 200, :body {:total "FOO: this, BAR: that"}} (call m/schema custom-meta-merge-checking-schema))) (is (= {:status 200, :body {:total "FOO: this, BAR: that"}} (call identity custom-meta-merge-checking-parameters))))) - (testing "options" + (testing "malli options" (let [->app (fn [options] (ring/ring-handler (ring/router @@ -593,7 +593,7 @@ [:i :int] [:x :string]]} :handler (fn [{{:keys [body]} :parameters}] - {:status 200 :body {}})}}] + {:status 200 :body body})}}] {:data {:middleware [rrc/coerce-exceptions-middleware rrc/coerce-request-middleware rrc/coerce-response-middleware] @@ -611,7 +611,12 @@ :malli.core/missing-key {:error/message {:en "MISSING"}}}}}) (assoc request :body-params {:i "x"})) :body - :humanized)))))))) + :humanized)))) + (testing "overriding registry" + (is (= {:body {:i "x" :x "x"} :status 200} + (-> ((->app {:options {:registry (merge (m/default-schemas) + {:int :string})}}) + (assoc request :body-params {:i "x" :x "x"})))))))))) #?(:clj (deftest per-content-type-test