Permalink
Browse files

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

  • Loading branch information...
1 parent 6ae32fd commit 19e3384bb17a3399fc5224b8d83c6564e8e1ca04 @tj tj committed Nov 24, 2011
Showing with 17 additions and 0 deletions.
  1. +1 −0 test/fixtures/name.txt
  2. +16 −0 test/res.sendfile.js
View
@@ -0,0 +1 @@
+tobi
View
@@ -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);
+ })
+ })
})
})
})

0 comments on commit 19e3384

Please sign in to comment.