mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
Fix: account for changed malli encoder behavior that was breaking ring-coercion-test
This commit is contained in:
parent
f99a76886e
commit
982ac3ec72
1 changed files with 7 additions and 5 deletions
|
|
@ -652,12 +652,14 @@
|
|||
:uri "/foo"
|
||||
:muuntaja/request {:format request-format}
|
||||
:muuntaja/response {:format response-format}
|
||||
:body-params body})]
|
||||
:body-params body})
|
||||
normalize-json (fn[body]
|
||||
(-> body j/write-value-as-string (j/read-value j/keyword-keys-object-mapper)))]
|
||||
(testing "succesful call"
|
||||
(is (= {:status 200 :body {:request :json, :response :json}}
|
||||
(call (request "application/json" "application/json" {:request :json :response :json}))))
|
||||
(is (= {:status 200 :body {:request :edn, :response :json}}
|
||||
(call (request "application/edn" "application/json" {:request :edn :response :json}))))
|
||||
(is (= {:status 200 :body {:request "json", :response "json"}}
|
||||
(normalize-json (call (request "application/json" "application/json" {:request :json :response :json})))))
|
||||
(is (= {:status 200 :body {:request "edn", :response "json"}}
|
||||
(normalize-json (call (request "application/edn" "application/json" {:request :edn :response :json})))))
|
||||
(is (= {:status 200 :body {:request :default, :response :default}}
|
||||
(call (request "application/transit" "application/transit" {:request :default :response :default})))))
|
||||
(testing "request validation fails"
|
||||
|
|
|
|||
Loading…
Reference in a new issue