]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Added test for OpenGraph 2383/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 7 Oct 2016 12:06:12 +0000 (14:06 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 7 Oct 2016 12:06:12 +0000 (14:06 +0200)
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php

index c40e10a50041135efd2b49af3ba57edba2e8adda..03267e7686a2a46ebe66f9fa993993dede9d0809 100644 (file)
@@ -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);