Permalink
Browse files

include unit test for no-cache closes #2

  • Loading branch information...
1 parent 3e48f29 commit 0ea3ea4747b968dfa3a110d697a4d621fe24deb8 @paulwalker paulwalker committed Apr 20, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 test/fresh.js
View
@@ -121,4 +121,12 @@ describe('fresh(reqHeader, resHeader)', function(){
})
})
})
+
+ describe('when requested with Cache-Control: no-cache', function(){
+ it('should be stale', function(){
+ var req = { 'cache-control' : ' no-cache' };
+ var res = {};
+ fresh(req, res).should.be.false;
+ })
+ })
})

0 comments on commit 0ea3ea4

Please sign in to comment.