]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Added test for list view
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 28 Nov 2016 10:12:35 +0000 (11:12 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 28 Nov 2016 13:27:58 +0000 (14:27 +0100)
tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php

index a28c3b6bb7be53c8baae35d35822c217a371ad76..61726eb61ea60038f28c3fda0a691a9813c73714 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Tests\Wallabag\CoreBundle\Controller;
+namespace tests\Wallabag\CoreBundle\Controller;
 
 use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
 use Wallabag\CoreBundle\Entity\Config;
@@ -836,4 +836,21 @@ class ConfigControllerTest extends WallabagCoreTestCase
 
         $this->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());
+    }
 }