Add unread filter test to EntryControllerTest

Add a new test to the EntryControllerTest collection which checks that
only entries which have not been archived (and are treated as "unread")
are retrieved.
This commit is contained in:
Daniel Bartram 2016-05-09 19:48:28 +01:00
parent 733b2cf19b
commit 30334567a3

View file

@ -471,6 +471,24 @@ class EntryControllerTest extends WallabagCoreTestCase
$this->assertCount(1, $crawler->filter('div[class=entry]'));
}
public function testFilterOnUnreadStatus()
{
$this->logInAs('admin');
$client = $this->getClient();
$crawler = $client->request('GET', '/all/list');
$form = $crawler->filter('button[id=submit-filter]')->form();
$data = [
'entry_filter[isUnread]' => true,
];
$crawler = $client->submit($form, $data);
$this->assertCount(4, $crawler->filter('div[class=entry]'));
}
public function testFilterOnCreationDate()
{
$this->logInAs('admin');