diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-01 17:26:36 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-01 17:26:36 +0200 |
commit | 55551e332c2fe3e502b32eba92b63a967afcc0ef (patch) | |
tree | 2d3ea2a4dc2554b87f1299f17bd95c20b3efa41a | |
parent | 6273fefd5d945de1d871815a652f5a716e12e820 (diff) | |
download | wallabag-55551e332c2fe3e502b32eba92b63a967afcc0ef.tar.gz wallabag-55551e332c2fe3e502b32eba92b63a967afcc0ef.tar.zst wallabag-55551e332c2fe3e502b32eba92b63a967afcc0ef.zip |
Add test when url doesn’t exist
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
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 | |||
695 | 695 | ||
696 | $this->assertEquals(true, $content['exists']); | 696 | $this->assertEquals(true, $content['exists']); |
697 | } | 697 | } |
698 | |||
699 | public function testGetEntriesExistsWhichDoesNotExists() | ||
700 | { | ||
701 | $this->client->request('GET', '/api/entries/exists?url=http://google.com/entry2'); | ||
702 | |||
703 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); | ||
704 | |||
705 | $content = json_decode($this->client->getResponse()->getContent(), true); | ||
706 | |||
707 | $this->assertEquals(false, $content['exists']); | ||
708 | } | ||
698 | } | 709 | } |