From 21d82c3c5d211ee3e30cf71d2de3ebac0d63da54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 7 Oct 2016 14:06:12 +0200 Subject: [PATCH] Added test for OpenGraph --- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index c40e10a5..03267e76 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -753,7 +753,7 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertCount(2, $crawler->filter('div[class=entry]')); } - public function testCache() + public function testShareEntryPublicly() { $this->logInAs('admin'); $client = $this->getClient(); @@ -778,6 +778,9 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertContains('public', $client->getResponse()->headers->get('cache-control')); $this->assertContains('s-maxage=25200', $client->getResponse()->headers->get('cache-control')); $this->assertNotContains('no-cache', $client->getResponse()->headers->get('cache-control')); + $this->assertContains('og:title', $client->getResponse()->getContent()); + $this->assertContains('og:type', $client->getResponse()->getContent()); + $this->assertContains('og:url', $client->getResponse()->getContent()); // sharing is now disabled $client->getContainer()->get('craue_config')->set('share_public', 0); -- 2.41.0