File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 4343 body => {:beers [" ipa" " apa" ]})))
4444
4545 (fact " body-coersion can ba disabled"
46- (let [no-body-coercion (fn [_] (dissoc mw/default-coercion-matchers :body ))
46+ (let [no-body-coercion (constantly (dissoc mw/default-coercion-matchers :body ))
4747 app (api
4848 {:coercion no-body-coercion}
4949 beer-route)]
5252 body => {:beers [" ipa" " apa" " ipa" ]})))
5353
5454 (fact " body-coersion can ba changed"
55- (let [nop-body-coercion (fn [_] (assoc mw/default-coercion-matchers :body (constantly nil )))
55+ (let [nop-body-coercion (constantly (assoc mw/default-coercion-matchers :body (constantly nil )))
5656 app (api
5757 {:coercion nop-body-coercion}
5858 beer-route)]
7171 body => {:i 10 })))
7272
7373 (fact " query-coersion can ba disabled"
74- (let [no-query-coercion (fn [_] (dissoc mw/default-coercion-matchers :string ))
74+ (let [no-query-coercion (constantly (dissoc mw/default-coercion-matchers :string ))
7575 app (api
7676 {:coercion no-query-coercion}
7777 query-route)]
8080 body => {:i " 10" })))
8181
8282 (fact " query-coersion can ba changed"
83- (let [nop-query-coercion (fn [_] (assoc mw/default-coercion-matchers :string (constantly nil )))
83+ (let [nop-query-coercion (constantly (assoc mw/default-coercion-matchers :string (constantly nil )))
8484 app (api
8585 {:coercion nop-query-coercion}
8686 query-route)]
9292 :query-params [i :- s/Int]
9393 (ok {:i i}))
9494 (GET* " /disabled-coercion" []
95- :coercion (fn [_] (assoc mw/default-coercion-matchers :string (constantly nil )))
95+ :coercion (constantly (assoc mw/default-coercion-matchers :string (constantly nil )))
9696 :query-params [i :- s/Int]
9797 (ok {:i i}))
9898 (GET* " /no-coercion" []
You can’t perform that action at this time.
0 commit comments