0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Merge pull request #5802 from sebgie/fix-cache-test

Fix cache-control test
This commit is contained in:
Hannah Wolfe 2015-09-08 19:17:41 +01:00
commit 1cbef8a712

View file

@ -77,18 +77,18 @@ describe('Middleware: cacheControl', function () {
});
});
});
});
it('will override public with private for private blogs', function (done) {
res.isPrivateBlog = true;
middleware.cacheControl('public')(null, res, function (a) {
should.not.exist(a);
res.set.calledOnce.should.be.true;
res.set.calledWith({
'Cache-Control':
'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0'
});
done();
it('will override public with private for private blogs', function (done) {
res.isPrivateBlog = true;
middleware.cacheControl('public')(null, res, function (a) {
should.not.exist(a);
res.set.calledOnce.should.be.true;
res.set.calledWith({
'Cache-Control':
'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0'
});
done();
});
});
});