aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-12-11 19:38:21 +0100
committerGitHub <noreply@github.com>2017-12-11 19:38:21 +0100
commitc31daf4725312e94102daece14b299ab62f878d1 (patch)
treebb4304f71b986d07552c09ab68b92c8f83922689 /tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
parent12e7599b3517b3fd7a7fce999e5d27f1165d07b3 (diff)
parenta40a8038d3eb7f5e31cb364a4fb695e1ef02b9a6 (diff)
downloadwallabag-c31daf4725312e94102daece14b299ab62f878d1.tar.gz
wallabag-c31daf4725312e94102daece14b299ab62f878d1.tar.zst
wallabag-c31daf4725312e94102daece14b299ab62f878d1.zip
Merge pull request #3473 from cvergne/fix-rssall
Fix All RSS not accessible if not logged in + Tests
Diffstat (limited to 'tests/Wallabag/CoreBundle/Controller/RssControllerTest.php')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/RssControllerTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
index c6ca4937..2af6e14f 100644
--- a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php
@@ -61,6 +61,9 @@ class RssControllerTest extends WallabagCoreTestCase
61 [ 61 [
62 '/wallace/YZIOAUZIAO/archives.xml', 62 '/wallace/YZIOAUZIAO/archives.xml',
63 ], 63 ],
64 [
65 '/wallace/YZIOAUZIAO/all.xml',
66 ],
64 ]; 67 ];
65 } 68 }
66 69
@@ -141,6 +144,28 @@ class RssControllerTest extends WallabagCoreTestCase
141 $this->validateDom($client->getResponse()->getContent(), 'archive', 'archive'); 144 $this->validateDom($client->getResponse()->getContent(), 'archive', 'archive');
142 } 145 }
143 146
147 public function testAll()
148 {
149 $client = $this->getClient();
150 $em = $client->getContainer()->get('doctrine.orm.entity_manager');
151 $user = $em
152 ->getRepository('WallabagUserBundle:User')
153 ->findOneByUsername('admin');
154
155 $config = $user->getConfig();
156 $config->setRssToken('SUPERTOKEN');
157 $config->setRssLimit(null);
158 $em->persist($config);
159 $em->flush();
160
161 $client = $this->getClient();
162 $client->request('GET', '/admin/SUPERTOKEN/all.xml');
163
164 $this->assertSame(200, $client->getResponse()->getStatusCode());
165
166 $this->validateDom($client->getResponse()->getContent(), 'all', 'all');
167 }
168
144 public function testPagination() 169 public function testPagination()
145 { 170 {
146 $client = $this->getClient(); 171 $client = $this->getClient();