]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
Fix All RSS not accessible if not logged in + Tests
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Controller / RssControllerTest.php
index c6ca49374cd002086226fa66714102b7992d462e..2af6e14f3d80b1a352db946ab0a4ce2554ce9d31 100644 (file)
@@ -61,6 +61,9 @@ class RssControllerTest extends WallabagCoreTestCase
             [
                 '/wallace/YZIOAUZIAO/archives.xml',
             ],
+            [
+                '/wallace/YZIOAUZIAO/all.xml',
+            ],
         ];
     }
 
@@ -141,6 +144,28 @@ class RssControllerTest extends WallabagCoreTestCase
         $this->validateDom($client->getResponse()->getContent(), 'archive', 'archive');
     }
 
+    public function testAll()
+    {
+        $client = $this->getClient();
+        $em = $client->getContainer()->get('doctrine.orm.entity_manager');
+        $user = $em
+            ->getRepository('WallabagUserBundle:User')
+            ->findOneByUsername('admin');
+
+        $config = $user->getConfig();
+        $config->setRssToken('SUPERTOKEN');
+        $config->setRssLimit(null);
+        $em->persist($config);
+        $em->flush();
+
+        $client = $this->getClient();
+        $client->request('GET', '/admin/SUPERTOKEN/all.xml');
+
+        $this->assertSame(200, $client->getResponse()->getStatusCode());
+
+        $this->validateDom($client->getResponse()->getContent(), 'all', 'all');
+    }
+
     public function testPagination()
     {
         $client = $this->getClient();