aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorDaniel Bartram <me@danielbartram.com>2016-05-09 19:48:28 +0100
committerDaniel Bartram <me@danielbartram.com>2016-05-09 19:48:28 +0100
commit30334567a3a4c82a8bf97fc2fb95b87bb495add1 (patch)
tree0e845450bf0947d2fde541dcb1b987dcc01d48ad /src
parent733b2cf19b5d5a93617f24b2447b9a30ba22d303 (diff)
downloadwallabag-30334567a3a4c82a8bf97fc2fb95b87bb495add1.tar.gz
wallabag-30334567a3a4c82a8bf97fc2fb95b87bb495add1.tar.zst
wallabag-30334567a3a4c82a8bf97fc2fb95b87bb495add1.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index df4c34cd..c7087a71 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -471,6 +471,24 @@ class EntryControllerTest extends WallabagCoreTestCase
471 $this->assertCount(1, $crawler->filter('div[class=entry]')); 471 $this->assertCount(1, $crawler->filter('div[class=entry]'));
472 } 472 }
473 473
474 public function testFilterOnUnreadStatus()
475 {
476 $this->logInAs('admin');
477 $client = $this->getClient();
478
479 $crawler = $client->request('GET', '/all/list');
480
481 $form = $crawler->filter('button[id=submit-filter]')->form();
482
483 $data = [
484 'entry_filter[isUnread]' => true,
485 ];
486
487 $crawler = $client->submit($form, $data);
488
489 $this->assertCount(4, $crawler->filter('div[class=entry]'));
490 }
491
474 public function testFilterOnCreationDate() 492 public function testFilterOnCreationDate()
475 { 493 {
476 $this->logInAs('admin'); 494 $this->logInAs('admin');