Skip to content

Commit

Permalink
Run some ring tests only on jvm
Browse files Browse the repository at this point in the history
  • Loading branch information
Deraen committed Jan 22, 2025
1 parent ea88b06 commit 0370750
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/cljc/reitit/ring_coercion_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
(let [{:keys [status]} (app invalid-request2)]
(is (= 500 status))))))))

#?(:clj
(deftest schema-coercion-test
(let [create (fn [middleware]
(ring/ring-handler
Expand Down Expand Up @@ -211,7 +212,7 @@

(testing "invalid response"
(let [{:keys [status]} (app invalid-request2)]
(is (= 500 status))))))))
(is (= 500 status)))))))))

(defn- custom-meta-merge-checking-schema
([] {})
Expand Down Expand Up @@ -582,6 +583,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)))))))

#?(:clj
(deftest per-content-type-test
(doseq [[coercion json-request edn-request default-request json-response edn-response default-response]
[[malli/coercion
Expand Down Expand Up @@ -675,7 +677,7 @@
(is (= {:type :reitit.coercion/response-coercion :in [:response :body]}
(call (request "application/json" "application/edn" {:request :json :response :json}))))
(is (= {:type :reitit.coercion/response-coercion :in [:response :body]}
(call (request "application/json" "application/transit" {:request :json :response :json})))))))))))
(call (request "application/json" "application/transit" {:request :json :response :json}))))))))))))


#?(:clj
Expand Down

0 comments on commit 0370750

Please sign in to comment.