diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-05 12:05:50 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-05 12:05:50 +0200 |
commit | 72db15ca5d7950a604f359056fc6a627f25e4ee4 (patch) | |
tree | a41b8f80b88425aff8f2a09556a0125659076e19 /tests/Wallabag/ApiBundle/Controller | |
parent | efd351c98fa0caa4c8df9c7ff6965c537524f12a (diff) | |
download | wallabag-72db15ca5d7950a604f359056fc6a627f25e4ee4.tar.gz wallabag-72db15ca5d7950a604f359056fc6a627f25e4ee4.tar.zst wallabag-72db15ca5d7950a604f359056fc6a627f25e4ee4.zip |
Little refacto and send 400 on reaching urls limit
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 8594ad0b..34a2f894 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | |||
@@ -810,10 +810,6 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
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 | 812 | ||
813 | /** | ||
814 | * @expectedException Symfony\Component\Config\Definition\Exception\Exception | ||
815 | * @expectedExceptionMessage API limit reached | ||
816 | */ | ||
817 | public function testLimitBulkAction() | 813 | public function testLimitBulkAction() |
818 | { | 814 | { |
819 | $list = [ | 815 | $list = [ |
@@ -831,5 +827,8 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
831 | ]; | 827 | ]; |
832 | 828 | ||
833 | $this->client->request('POST', '/api/entries/lists?urls='.json_encode($list)); | 829 | $this->client->request('POST', '/api/entries/lists?urls='.json_encode($list)); |
830 | |||
831 | $this->assertEquals(400, $this->client->getResponse()->getStatusCode()); | ||
832 | $this->assertContains('API limit reached', $this->client->getResponse()->getContent()); | ||
834 | } | 833 | } |
835 | } | 834 | } |