From 68a90821a305867e9b655da2dbfe558d37253990 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 26 Apr 2019 13:40:58 +0200 Subject: Handle redirection from previous feeds --- .../CoreBundle/Controller/FeedControllerTest.php | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php') diff --git a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php index 70f33ebe..d52d7bb8 100644 --- a/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/FeedControllerTest.php @@ -225,4 +225,37 @@ class FeedControllerTest extends WallabagCoreTestCase $client->request('GET', '/feed/admin/SUPERTOKEN/tags/foo/3000'); $this->assertSame(302, $client->getResponse()->getStatusCode()); } + + public function dataForRedirect() + { + return [ + [ + '/admin/YZIOAUZIAO/unread.xml', + ], + [ + '/admin/YZIOAUZIAO/starred.xml', + ], + [ + '/admin/YZIOAUZIAO/archive.xml', + ], + [ + '/admin/YZIOAUZIAO/all.xml', + ], + [ + '/admin/YZIOAUZIAO/tags/foo.xml', + ], + ]; + } + + /** + * @dataProvider dataForRedirect + */ + public function testRedirectFromRssToAtom($url) + { + $client = $this->getClient(); + + $client->request('GET', $url); + + $this->assertSame(301, $client->getResponse()->getStatusCode()); + } } -- cgit v1.2.3