diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-05-01 09:21:59 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-05-01 09:26:12 +0200 |
commit | efd351c98fa0caa4c8df9c7ff6965c537524f12a (patch) | |
tree | 78a268e63d8983b88c95a2518df62b9b06889827 /tests/Wallabag/ApiBundle/Controller | |
parent | 7fa844a34983f9929348e70ddd408cf6ba5811b6 (diff) | |
download | wallabag-efd351c98fa0caa4c8df9c7ff6965c537524f12a.tar.gz wallabag-efd351c98fa0caa4c8df9c7ff6965c537524f12a.tar.zst wallabag-efd351c98fa0caa4c8df9c7ff6965c537524f12a.zip |
Added limit
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 23 |
1 files changed, 23 insertions, 0 deletions
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 | |||
809 | $this->assertFalse($content[1]['entry']); | 809 | $this->assertFalse($content[1]['entry']); |
810 | $this->assertEquals('http://0.0.0.0/entry3', $content[1]['url']); | 810 | $this->assertEquals('http://0.0.0.0/entry3', $content[1]['url']); |
811 | } | 811 | } |
812 | |||
813 | /** | ||
814 | * @expectedException Symfony\Component\Config\Definition\Exception\Exception | ||
815 | * @expectedExceptionMessage API limit reached | ||
816 | */ | ||
817 | public function testLimitBulkAction() | ||
818 | { | ||
819 | $list = [ | ||
820 | 'http://0.0.0.0/entry1', | ||
821 | 'http://0.0.0.0/entry1', | ||
822 | 'http://0.0.0.0/entry1', | ||
823 | 'http://0.0.0.0/entry1', | ||
824 | 'http://0.0.0.0/entry1', | ||
825 | 'http://0.0.0.0/entry1', | ||
826 | 'http://0.0.0.0/entry1', | ||
827 | 'http://0.0.0.0/entry1', | ||
828 | 'http://0.0.0.0/entry1', | ||
829 | 'http://0.0.0.0/entry1', | ||
830 | 'http://0.0.0.0/entry1', | ||
831 | ]; | ||
832 | |||
833 | $this->client->request('POST', '/api/entries/lists?urls='.json_encode($list)); | ||
834 | } | ||
812 | } | 835 | } |