Permalink
Browse files

Range tests

  • Loading branch information...
1 parent f36abf5 commit e067641b0c7a1e7a2697590e55e4a264b736b56e @tj tj committed Nov 12, 2011
Showing with 17 additions and 0 deletions.
  1. +1 −0 test/fixtures/nums
  2. +16 −0 test/static.js
View
@@ -0,0 +1 @@
+123456789
View
@@ -105,6 +105,22 @@ describe('connect.static()', function(){
})
})
+ describe('Range', function(){
+ it('should support byte ranges', function(done){
+ app.request()
+ .get('/nums')
+ .set('Range', 'bytes=0-4')
+ .expect('12345', done);
+ })
+
+ it('should respond with 206 "Partial Content"', function(done){
+ app.request()
+ .get('/nums')
+ .set('Range', 'bytes=0-4')
+ .expect(206, done);
+ })
+ })
+
// TODO: node bug
// describe('on ENAMETOOLONG', function(){
// it('should next()', function(done){

0 comments on commit e067641

Please sign in to comment.