diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-05-09 13:56:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-09 13:56:44 +0200 |
commit | a2ae05a61ca7aad476a48247a4559c25dd55618d (patch) | |
tree | 2bedaed8627fac2a1bf701150c3af57792bff02d /tests | |
parent | c829b06ed8f757f2b96515eb872f9ccf20363c94 (diff) | |
parent | 1b1647175d7eaa2800a2eff9f984ef37e9976fba (diff) | |
download | wallabag-a2ae05a61ca7aad476a48247a4559c25dd55618d.tar.gz wallabag-a2ae05a61ca7aad476a48247a4559c25dd55618d.tar.zst wallabag-a2ae05a61ca7aad476a48247a4559c25dd55618d.zip |
Merge pull request #3076 from wallabag/hotfix/2979
Disable negative numbers in filters
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 3eb6d47f..7db4cf1f 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | |||
@@ -591,6 +591,26 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
591 | $this->assertCount(1, $crawler->filter('div[class=entry]')); | 591 | $this->assertCount(1, $crawler->filter('div[class=entry]')); |
592 | } | 592 | } |
593 | 593 | ||
594 | public function testFilterOnReadingTimeWithNegativeValue() | ||
595 | { | ||
596 | $this->logInAs('admin'); | ||
597 | $client = $this->getClient(); | ||
598 | |||
599 | $crawler = $client->request('GET', '/unread/list'); | ||
600 | |||
601 | $form = $crawler->filter('button[id=submit-filter]')->form(); | ||
602 | |||
603 | $data = [ | ||
604 | 'entry_filter[readingTime][right_number]' => -22, | ||
605 | 'entry_filter[readingTime][left_number]' => -22, | ||
606 | ]; | ||
607 | |||
608 | $crawler = $client->submit($form, $data); | ||
609 | |||
610 | // forcing negative value results in no entry displayed | ||
611 | $this->assertCount(0, $crawler->filter('div[class=entry]')); | ||
612 | } | ||
613 | |||
594 | public function testFilterOnReadingTimeOnlyUpper() | 614 | public function testFilterOnReadingTimeOnlyUpper() |
595 | { | 615 | { |
596 | $this->logInAs('admin'); | 616 | $this->logInAs('admin'); |