Skip to content
Myr

added test for res.sendfile() content-type override

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 e60f4a5 · Browse files · 1 file+17 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

1 file+17 added−1 removed

  • tests:+17 added−1 removed

1 file+17 added−1 removed

modified:test/res.sendfile.js+17 added-1 removed
44 unmodified lines
45 res.statusCode.should.equal(200);46 done();47 });48 })49 4950 it('should not override manual content-types', function(done){51 var app = express();5253 app.use(function(req, res){54 res.contentType('txt');55 res.sendfile('test/fixtures/user.html');56 });5758 request(app)59 .get('/')60 .end(function(res){61 res.should.have.header('content-type', 'text/plain');62 done();63 });64 })6566 it('should invoke the callback on 403', function(done){67 var app = express()68 , calls = 0;69
160 unmodified lines