From: Jeremy Benoist Date: Sat, 1 Oct 2016 15:26:36 +0000 (+0200) Subject: Add test when url doesn’t exist X-Git-Tag: 2.1.0~8^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=55551e332c2fe3e502b32eba92b63a967afcc0ef;p=github%2Fwallabag%2Fwallabag.git Add test when url doesn’t exist --- diff --git a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php index e582e5f9..9b5760bc 100644 --- a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php @@ -695,4 +695,15 @@ class WallabagRestControllerTest extends WallabagApiTestCase $this->assertEquals(true, $content['exists']); } + + public function testGetEntriesExistsWhichDoesNotExists() + { + $this->client->request('GET', '/api/entries/exists?url=http://google.com/entry2'); + + $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + + $content = json_decode($this->client->getResponse()->getContent(), true); + + $this->assertEquals(false, $content['exists']); + } }