diff --git a/test/fixtures/name.txt b/test/fixtures/name.txt new file mode 100644 index 00000000..fa66f37f --- /dev/null +++ b/test/fixtures/name.txt @@ -0,0 +1 @@ +tobi \ No newline at end of file diff --git a/test/res.sendfile.js b/test/res.sendfile.js index 1837894f..68d24998 100644 --- a/test/res.sendfile.js +++ b/test/res.sendfile.js @@ -192,6 +192,22 @@ describe('res', function(){ 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); + }) + }) }) }) })