Skip to content
Myr

mockRequest() now supports overriding body

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent ef572f4 · Browse files · 3 files+22 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+22 added−5 removed

  • tests:+14 added−3 removed
  • other:+8 added−2 removed

3 files+22 added−5 removed

modified:lib/express.core.js+1 added-1 removed
187 unmodified lines
188 * @api private189 */190 191 callback : function(request, response){192 request.body = ''192 request.body = request.body || ''193 request.setBodyEncoding('utf8')194 request.addListener('body', function(chunk) { request.body += chunk })195 request.addListener('complete', function(){196 Express.home = Express.settings.basepath
476 unmodified lines
modified:lib/express.mocks.js+7 added-1 removed
modified:spec/spec.mocks.js+14 added-3 removed