ring-mock
ring-mock copied to clipboard
Library to create mock Ring requests for unit tests
A built-in support for mocking multipart uploads would be nice. In #9, @danielcompton gives a workaround using [Peridot](https://github.com/xeqi/peridot/)'s [`peridot.multipart/build`](https://github.com/xeqi/peridot/blob/master/src/peridot/multipart.clj): ```clojure (-> (ring.mock.request/request :post "/my-file-upload") (merge (peridot.multipart/build {:data (io/file (io/resource "data.csv"))}))...
This is a pull request that lets you add multiple headers to a request. Let me know what you think!
The previous behaviour was to insert an empty query string for an empty map of params, but leave out the key in case it was nil. This change makes it...