aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorDaniel Bartram <me@danielbartram.com>2016-05-09 19:48:28 +0100
committerThomas Citharel <tcit@tcit.fr>2016-06-23 09:15:50 +0200
commit26ed851f529fe3a50217940d47c20d9cd0f8954e (patch)
treef07b83ae64ad84fc207ef708930c584c0d58c4e7 /src
parent710f8e69d76c1a0d6279397c0283612ccef8ae69 (diff)
downloadwallabag-26ed851f529fe3a50217940d47c20d9cd0f8954e.tar.gz
wallabag-26ed851f529fe3a50217940d47c20d9cd0f8954e.tar.zst
wallabag-26ed851f529fe3a50217940d47c20d9cd0f8954e.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');