]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
store estimated reading time / filters on reading time
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / Controller / EntryControllerTest.php
index 904e2a5cfb6bb6b088deb5be22acc1fe6ecf0ac0..24848eb2f15e0ff198bc57ab278749d89c635d12 100644 (file)
@@ -78,7 +78,7 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->logInAs('admin');
         $client = $this->getClient();
 
-        $client->request('GET', '/archive');
+        $client->request('GET', '/archive/list');
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
     }
@@ -88,7 +88,7 @@ class EntryControllerTest extends WallabagCoreTestCase
         $this->logInAs('admin');
         $client = $this->getClient();
 
-        $client->request('GET', '/starred');
+        $client->request('GET', '/starred/list');
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
     }
@@ -240,4 +240,23 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $this->assertEquals(403, $client->getResponse()->getStatusCode());
     }
+
+    public function testFilterOnUnreadeView()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $crawler = $client->request('GET', '/unread/list');
+
+        $form = $crawler->filter('button[id=submit-filter]')->form();
+
+        $data = array(
+            'entry_filter[readingTime][right_number]' => 11,
+            'entry_filter[readingTime][left_number]' => 11
+        );
+
+        $crawler = $client->submit($form, $data);
+
+        $this->assertCount(1, $crawler->filter('div[class=entry]'));
+    }
 }