]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
Add isPublic filter on entries
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Controller / EntryControllerTest.php
index 3babbaca0654dfecf6bb1c06422af0a5a7738f93..853f37f2378cabbcc75a7ba3352aaefad98d4e7b 100644 (file)
@@ -860,6 +860,20 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->assertCount(1, $crawler->filter('div[class=entry]'));
     }
 
+    public function testFilterOnIsPublic()
+    {
+        $this->logInAs('admin');
+        $this->useTheme('baggy');
+        $client = $this->getClient();
+
+        $crawler = $client->request('GET', '/unread/list');
+        $form = $crawler->filter('button[id=submit-filter]')->form();
+        $form['entry_filter[isPublic]']->tick();
+
+        $crawler = $client->submit($form);
+        $this->assertCount(0, $crawler->filter('div[class=entry]'));
+    }
+
     public function testPreviewPictureFilter()
     {
         $this->logInAs('admin');
@@ -989,7 +1003,7 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->assertEquals($url, $entry->getUrl());
         $this->assertContains('Perpignan', $entry->getTitle());
         // instead of checking for the filename (which might change) check that the image is now local
-        $this->assertContains('http://v2.wallabag.org/assets/images/', $entry->getContent());
+        $this->assertContains('https://your-wallabag-url-instance.com/assets/images/', $entry->getContent());
 
         $client->getContainer()->get('craue_config')->set('download_images_enabled', 0);
     }