From efd351c98fa0caa4c8df9c7ff6965c537524f12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 1 May 2017 09:21:59 +0200 Subject: Added limit --- .../Controller/EntryRestControllerTest.php | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests/Wallabag/ApiBundle') diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 88a5be93..8594ad0b 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php @@ -809,4 +809,27 @@ class EntryRestControllerTest extends WallabagApiTestCase $this->assertFalse($content[1]['entry']); $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 = [ + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + 'http://0.0.0.0/entry1', + ]; + + $this->client->request('POST', '/api/entries/lists?urls='.json_encode($list)); + } } -- cgit v1.2.3