Added test for list view

This commit is contained in:
Nicolas Lœuillet 2016-11-28 11:12:35 +01:00
parent 9f01d0fde0
commit 8f3ff39ca3

View 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());
}
}