Skip to content
Myr

Added MockResponse

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

authored by visionmedia · committed by visionmedia · parent ad818b5 · Browse files · 3 files+23 added−7 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+23 added−7 removed

  • tests:+22 added−6 removed
  • other:+1 added−1 removed

3 files+23 added−7 removed

modified:lib/express/spec/mock-routes.js+18 added-2 removed
modified:lib/express/core.js+1 added-1 removed
modified:spec/spec.core.routing.js+4 added-4 removed
5 unmodified lines
6 end7 8 describe 'with callback function'9 it 'should respond with a body string'10 this[method]('/user', function(){10 GLOBAL[method]('/user', function(){11 return 'test'12 })13 this[method]('/user').body.should.eql 'test'13 GLOBAL[method]('/user').body.should.eql 'test'14 end15 end16 17 describe 'with options and callback function'18 it 'should respond with a body string'19 this[method]('/user', {}, function(){19 GLOBAL[method]('/user', {}, function(){20 return 'test with options'21 })22 this[method]('/user').body.should.eql 'test with options'22 GLOBAL[method]('/user').body.should.eql 'test with options'23 end24 end25 26 end
1 unmodified line