1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Add test and fix migration

This commit is contained in:
Nicolas Lœuillet 2016-04-15 13:42:13 +02:00
parent 222e09f140
commit a7e2218e25
3 changed files with 51 additions and 5 deletions

View file

@ -698,4 +698,22 @@ class EntryControllerTest extends WallabagCoreTestCase
$crawler = $client->submit($form, $data);
$this->assertCount(2, $crawler->filter('div[class=entry]'));
}
public function testCache()
{
$this->logInAs('admin');
$client = $this->getClient();
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
->findOneByUser($this->getLoggedInUserId());
$client->request('GET', '/share/'.$content->getUuid());
$this->assertContains('max-age=25200, public', $client->getResponse()->headers->get('cache-control'));
$this->assertNotContains('no-cache', $client->getResponse()->headers->get('cache-control'));
$client->request('GET', '/view/'.$content->getId());
$this->assertContains('no-cache', $client->getResponse()->headers->get('cache-control'));
}
}