File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 882882
883883(defn- nested-keys-to-flatten
884884 [{:keys [flatten-nested-keys] :as req}]
885- (when (and (not (nil? (opt req :ignore-nested-query-string )))
886- (not (nil? (opt req :flatten-nested-form-params )))
885+ (when (and (or ( not (nil? (opt req :ignore-nested-query-string )))
886+ (not (nil? (opt req :flatten-nested-form-params ) )))
887887 flatten-nested-keys)
888888 (throw (IllegalArgumentException.
889889 (str " only :flatten-nested-keys or :ignore-nested-query-string/"
Original file line number Diff line number Diff line change 13121312 {:flatten-nested-form-params true
13131313 :ignore-nested-query-string true
13141314 :flatten-nested-keys [:thing :bar ]})
1315+ (is false " should have thrown exception" )
1316+ (catch IllegalArgumentException e
1317+ (is (= (.getMessage e)
1318+ (str " only :flatten-nested-keys or :ignore-nested-query-string/"
1319+ " :flatten-nested-keys may be specified, not both" )))))
1320+ (try
1321+ ((client/wrap-flatten-nested-params identity)
1322+ {:ignore-nested-query-string true
1323+ :flatten-nested-keys [:thing :bar ]})
1324+ (is false " should have thrown exception" )
13151325 (catch IllegalArgumentException e
13161326 (is (= (.getMessage e)
13171327 (str " only :flatten-nested-keys or :ignore-nested-query-string/"
You can’t perform that action at this time.
0 commit comments