mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 00:19:48 +01:00
Added test for res.sendfile() with non-GET. Closes #723
This commit is contained in:
parent
6ae32fd596
commit
19e3384bb1
1
test/fixtures/name.txt
vendored
Normal file
1
test/fixtures/name.txt
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
tobi
|
||||
|
|
@ -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);
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user