xeqi/peridot — pull request #3 by aredington (2012-08-10 14:43:02+00:00)
Title: POST parameters are sent in the query-string

Peridot is hardcoded to craft the mock requests it sends using :get as the http verb keyword when it asks ring-mock for a request map. When peridot is making POST requests to send to the ring app in the presence of http parameters, this results in two problems:

1) It incorrectly encodes the parameters in the query string that gets sent to the ring application.
2) It incorrectly omits the parameters from the request body, and submits a POST with a blank body to the ring application.

The version of ring-mock peridot currently relies on in master does not correctly address verbs other than :get when handling parameters, however @weavejester has recently released version 0.1.3 of ring-mock which correctly does handle post parameters as part of the request body.

This pull request:
- Upgrades the ring-mock dependency to 0.1.3
- Adds tests demonstrating the incorrect handling of parameters on the master branch when the verb is post.
- Includes a bug fix to peridot.request/build which propogates the HTTP verb down to ring-mock if present, and defaults to GET if it is not present.