CDB-3256 fix test and adds a couple more of tests for testing the no-cache scenarios

This commit is contained in:
Raul Ochoa
2014-06-24 13:13:00 +02:00
parent 055bacbad7
commit 2dd03e21e1
2 changed files with 61 additions and 7 deletions
+16 -3
View File
@@ -37,8 +37,21 @@ function checkNoCache(res) {
}
module.exports = {
lzma_compress_to_base64: lzma_compress_to_base64,
checkNoCache: checkNoCache
/**
* Check that the response headers do not request caching
* @see checkNoCache
* @param res
*/
function checkCache(res) {
assert.ok(res.headers.hasOwnProperty('x-cache-channel'));
assert.ok(res.headers.hasOwnProperty('cache-control'));
assert.ok(res.headers.hasOwnProperty('last-modified'));
}
module.exports = {
lzma_compress_to_base64: lzma_compress_to_base64,
checkNoCache: checkNoCache,
checkCache: checkCache
};