Added test for res.sendfile() with non-GET. Closes #723

This commit is contained in:
Tj Holowaychuk 2011-11-24 12:34:47 -08:00
parent 6ae32fd596
commit 19e3384bb1
2 changed files with 17 additions and 0 deletions

1
test/fixtures/name.txt vendored Normal file
View File

@ -0,0 +1 @@
tobi

View File

@ -192,6 +192,22 @@ describe('res', function(){
done(); done();
}); });
}) })
describe('with non-GET', function(){
it('should still serve', function(done){
var app = express()
, calls = 0;
app.use(function(req, res){
res.sendfile(__dirname + '/fixtures/name.txt');
});
request(app)
.get('/')
.expect('tobi', done);
})
})
}) })
}) })
}) })