diff options
Diffstat (limited to 'share/www/script/test/uuids.js')
-rw-r--r-- | share/www/script/test/uuids.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/www/script/test/uuids.js b/share/www/script/test/uuids.js index 6f701884..f4b95898 100644 --- a/share/www/script/test/uuids.js +++ b/share/www/script/test/uuids.js @@ -14,20 +14,20 @@ couchTests.uuids = function(debug) { var testHashBustingHeaders = function(xhr) { T(xhr.getResponseHeader("Cache-Control").match(/no-cache/)); T(xhr.getResponseHeader("Pragma") == "no-cache"); - + var currentTime = new Date(); var expiresHeader = Date.parse(xhr.getResponseHeader("Expires")); - var dateHeader = Date.parse(xhr.getResponseHeader("Date")); - + var dateHeader = Date.parse(xhr.getResponseHeader("Date")); + T(expiresHeader < currentTime); T(currentTime - dateHeader < 3000); }; - + var db = new CouchDB("test_suite_db"); db.deleteDb(); db.createDb(); if (debug) debugger; - + // a single UUID without an explicit count var xhr = CouchDB.request("GET", "/_uuids"); T(xhr.status == 200); @@ -55,7 +55,7 @@ couchTests.uuids = function(debug) { T(seen[id] === undefined); seen[id] = 1; } - + // ensure we return a 405 on POST xhr = CouchDB.request("POST", "/_uuids?count=1000"); T(xhr.status == 405); |