From 671a2b887f3215366e8acc05fcfa4e57264d3e69 Mon Sep 17 00:00:00 2001 From: Maxime LECLERCQ Date: Fri, 19 Feb 2016 14:22:27 +0100 Subject: Fix #1551 - Redirect to the last page when current page is out of range --- .../CoreBundle/Tests/Controller/EntryControllerTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php') diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index 32d6a575..5512d6e1 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php @@ -216,6 +216,17 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertEquals(200, $client->getResponse()->getStatusCode()); } + public function testRangeException() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $client->request('GET', '/all/list/900'); + + $this->assertEquals(302, $client->getResponse()->getStatusCode()); + $this->assertEquals('/all/list', $client->getResponse()->getTargetUrl()); + } + /** * @depends testPostNewOk */ -- cgit v1.2.3