Add test when url doesn’t exist

This commit is contained in:
Jeremy Benoist 2016-10-01 17:26:36 +02:00
parent 6273fefd5d
commit 55551e332c
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C

View file

@ -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']);
}
}