Skip to content
Myr

Added res.send() HEAD tests

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent b0c9209 · Browse files · 2 files+22 added−1 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+22 added−1 removed

  • tests:+22 added−1 removed

2 files+22 added−1 removed

modified:test/support/http.js+4 added
modified:test/res.send.js+18 added-1 removed
160 unmodified lines
161 done();162 })163 })164 })165 165166 describe('when the request method is HEAD', function(){167 it('should ignore the body', function(done){168 var app = express();169170 app.use(function(req, res){171 res.send('yay');172 });173174 request(app)175 .head('/')176 .end(function(res){177 res.body.should.equal('');178 done();179 })180 })181 })182183 describe('when .statusCode is 204', function(){184 it('should strip Content-* fields & body', function(done){185 var app = express();186
34 unmodified lines