Permalink
Browse files

Fix unit test: no-cache caches the response

  • Loading branch information...
1 parent 6bebc96 commit ee2ed9f69dc685567fc34774f5b4baa6f36582b8 @rs rs committed Jun 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 SDURLCacheTests.m
View
@@ -69,7 +69,7 @@ - (void)testExpirationDateFromHeader
// Cache-Control: no-cache with Expires in the future
expDate = [SDURLCache expirationDateFromHeaders:[NSDictionary dictionaryWithObjectsAndKeys:@"no-cache", @"Cache-Control", futureDate, @"Expires", nil] withStatusCode:200];
- STAssertNil(expDate, @"Cache-Control no-cache with Expires in the future");
+ STAssertTrue([expDate timeIntervalSinceNow] > 0, @"Cache-Control no-cache with Expires in the future");
// Cache-Control with future date
expDate = [SDURLCache expirationDateFromHeaders:[NSDictionary dictionaryWithObjectsAndKeys:@"public, max-age=1000", @"Cache-Control", nil] withStatusCode:200];

0 comments on commit ee2ed9f

Please sign in to comment.