From 8f3ff39ca364a28163fb9ced0eb3291e0c1caeaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Nov 2016 11:12:35 +0100 Subject: [PATCH] Added test for list view --- .../Controller/ConfigControllerTest.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index a28c3b6b..61726eb6 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php @@ -1,6 +1,6 @@ assertEmpty($annotationsReset, 'Annotations were reset'); } + + public function testSwitchViewMode() + { + $this->logInAs('admin'); + $client = $this->getClient(); + + $client->request('GET', '/unread/list'); + + $this->assertNotContains('listmode', $client->getResponse()->getContent()); + + $client->request('GET', '/config/view-mode'); + $crawler = $client->followRedirect(); + + $client->request('GET', '/unread/list'); + + $this->assertContains('listmode', $client->getResponse()->getContent()); + } } -- 2.41.0