X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/756b55bbffedb6e5fde91f9fbc61f5a382f20705..refs/pull/3032/head:/tests/SecurityHeaderTest.php diff --git a/tests/SecurityHeaderTest.php b/tests/SecurityHeaderTest.php index 2bde890ad..10551fc55 100644 --- a/tests/SecurityHeaderTest.php +++ b/tests/SecurityHeaderTest.php @@ -119,6 +119,15 @@ class SecurityHeaderTest extends TestCase $this->assertEquals('base-uri \'self\'', $scriptHeader); } + public function test_cache_control_headers_are_strict_on_responses_when_logged_in() + { + $this->asEditor(); + $resp = $this->get('/'); + $resp->assertHeader('Cache-Control', 'max-age=0, no-store, private'); + $resp->assertHeader('Pragma', 'no-cache'); + $resp->assertHeader('Expires', 'Sun, 12 Jul 2015 19:01:00 GMT'); + } + /** * Get the value of the first CSP header of the given type. */