aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index 5c739c78..3b54f057 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -698,4 +698,22 @@ class EntryControllerTest extends WallabagCoreTestCase
698 $crawler = $client->submit($form, $data); 698 $crawler = $client->submit($form, $data);
699 $this->assertCount(2, $crawler->filter('div[class=entry]')); 699 $this->assertCount(2, $crawler->filter('div[class=entry]'));
700 } 700 }
701
702 public function testCache()
703 {
704 $this->logInAs('admin');
705 $client = $this->getClient();
706
707 $content = $client->getContainer()
708 ->get('doctrine.orm.entity_manager')
709 ->getRepository('WallabagCoreBundle:Entry')
710 ->findOneByUser($this->getLoggedInUserId());
711
712 $client->request('GET', '/share/'.$content->getUuid());
713 $this->assertContains('max-age=25200, public', $client->getResponse()->headers->get('cache-control'));
714 $this->assertNotContains('no-cache', $client->getResponse()->headers->get('cache-control'));
715
716 $client->request('GET', '/view/'.$content->getId());
717 $this->assertContains('no-cache', $client->getResponse()->headers->get('cache-control'));
718 }
701} 719}