diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-07 14:06:12 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-07 14:06:12 +0200 |
commit | 21d82c3c5d211ee3e30cf71d2de3ebac0d63da54 (patch) | |
tree | 5f7ee619ab92cc954b20d869005cd8ef2643dc26 /tests | |
parent | d0d196ffb34929de6c915c0b34375f3af6135747 (diff) | |
download | wallabag-21d82c3c5d211ee3e30cf71d2de3ebac0d63da54.tar.gz wallabag-21d82c3c5d211ee3e30cf71d2de3ebac0d63da54.tar.zst wallabag-21d82c3c5d211ee3e30cf71d2de3ebac0d63da54.zip |
Added test for OpenGraph
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 5 |
1 files changed, 4 insertions, 1 deletions
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 | |||
753 | $this->assertCount(2, $crawler->filter('div[class=entry]')); | 753 | $this->assertCount(2, $crawler->filter('div[class=entry]')); |
754 | } | 754 | } |
755 | 755 | ||
756 | public function testCache() | 756 | public function testShareEntryPublicly() |
757 | { | 757 | { |
758 | $this->logInAs('admin'); | 758 | $this->logInAs('admin'); |
759 | $client = $this->getClient(); | 759 | $client = $this->getClient(); |
@@ -778,6 +778,9 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
778 | $this->assertContains('public', $client->getResponse()->headers->get('cache-control')); | 778 | $this->assertContains('public', $client->getResponse()->headers->get('cache-control')); |
779 | $this->assertContains('s-maxage=25200', $client->getResponse()->headers->get('cache-control')); | 779 | $this->assertContains('s-maxage=25200', $client->getResponse()->headers->get('cache-control')); |
780 | $this->assertNotContains('no-cache', $client->getResponse()->headers->get('cache-control')); | 780 | $this->assertNotContains('no-cache', $client->getResponse()->headers->get('cache-control')); |
781 | $this->assertContains('og:title', $client->getResponse()->getContent()); | ||
782 | $this->assertContains('og:type', $client->getResponse()->getContent()); | ||
783 | $this->assertContains('og:url', $client->getResponse()->getContent()); | ||
781 | 784 | ||
782 | // sharing is now disabled | 785 | // sharing is now disabled |
783 | $client->getContainer()->get('craue_config')->set('share_public', 0); | 786 | $client->getContainer()->get('craue_config')->set('share_public', 0); |