mirror of https://github.com/wallabag/wallabag.git
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:
parent
733b2cf19b
commit
30334567a3
|
@ -471,6 +471,24 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertCount(1, $crawler->filter('div[class=entry]'));
|
$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()
|
public function testFilterOnCreationDate()
|
||||||
{
|
{
|
||||||
$this->logInAs('admin');
|
$this->logInAs('admin');
|
||||||
|
|
Loading…
Reference in New Issue