]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
Added default picture if preview picture is null
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Controller / EntryControllerTest.php
index 9942b2a0ac1505494219adf7ac8dd9cb551cec6a..d7bf03ba5879e9bf0e1668c140456cbbdeb84ae7 100644 (file)
@@ -29,7 +29,7 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
-        $this->assertContains('quickstart.intro.paragraph_1', $body[0]);
+        $this->assertContains('quickstart.intro.title', $body[0]);
 
         // Test if quickstart is disabled when user has 1 entry
         $crawler = $client->request('GET', '/new');
@@ -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,10 @@ 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());
+        $this->assertContains('og:image', $client->getResponse()->getContent());
 
         // sharing is now disabled
         $client->getContainer()->get('craue_config')->set('share_public', 0);