]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
Little refacto and send 400 on reaching urls limit
[github/wallabag/wallabag.git] / tests / Wallabag / ApiBundle / Controller / EntryRestControllerTest.php
index 8594ad0b4391272352cbe8912c6577bca44fe80d..34a2f8940b09a6bae05f39274f44c10eec02f876 100644 (file)
@@ -810,10 +810,6 @@ class EntryRestControllerTest extends WallabagApiTestCase
         $this->assertEquals('http://0.0.0.0/entry3', $content[1]['url']);
     }
 
-    /**
-     * @expectedException Symfony\Component\Config\Definition\Exception\Exception
-     * @expectedExceptionMessage API limit reached
-     */
     public function testLimitBulkAction()
     {
         $list = [
@@ -831,5 +827,8 @@ class EntryRestControllerTest extends WallabagApiTestCase
         ];
 
         $this->client->request('POST', '/api/entries/lists?urls='.json_encode($list));
+
+        $this->assertEquals(400, $this->client->getResponse()->getStatusCode());
+        $this->assertContains('API limit reached', $this->client->getResponse()->getContent());
     }
 }