Skip to content
Myr

Defaulting MockRequest host to "localhost"

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

authored by visionmedia · committed by visionmedia · parent 7f111bf · Browse files · 2 files+3 added−3 removed
This commit

State

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

Diff stats

2 files+3 added−3 removed

  • tests:+3 added−3 removed

2 files+3 added−3 removed

modified:lib/express/spec/mock-routes.js+1 added-1 removed
modified:spec/spec.core.helpers.js+2 added-2 removed
81 unmodified lines
82 it 'should return a request header value'83 get('/user', function(){84 return header('host')85 })86 get('/user', { headers: { host: 'localhost' }}).body.should.eql 'localhost'86 get('/user').body.should.eql 'localhost'87 end88 89 it 'should be case-insensitive'90 get('/user', function(){91 return header('Host')92 })93 get('/user', { headers: { host: 'localhost' }}).body.should.eql 'localhost'93 get('/user').body.should.eql 'localhost'94 end95 end96 end97
86 unmodified lines