Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tests
  • Loading branch information
tj committed Jun 10, 2012
1 parent f3da994 commit 9906171
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/fresh.js
Expand Up @@ -63,8 +63,21 @@ describe('fresh(reqHeader, resHeader)', function(){
})
})

xdescribe('with invalid if-modified-since date');
xdescribe('with invalid modified-since date');
describe('with invalid if-modified-since date', function(){
it('should be stale', function(){
var req = { 'if-none-match': 'foo' };
var res = {};
fresh(req, res).should.be.false;
})
})

describe('with invalid modified-since date', function(){
it('should be stale', function(){
var req = { 'if-none-match': new Date().toUTCString() };
var res = { 'modified-since': 'foo' };
fresh(req, res).should.be.false;
})
})
})

describe('when requested with If-Modified-Since and If-None-Match', function(){
Expand Down

0 comments on commit 9906171

Please sign in to comment.