From 72db15ca5d7950a604f359056fc6a627f25e4ee4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 5 May 2017 12:05:50 +0200 Subject: Little refacto and send 400 on reaching urls limit --- tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/Wallabag/ApiBundle/Controller') 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 $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()); } } -- cgit v1.2.3