1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Some cleanup

Also, do not run the hashed_url migration into a Doctrine migration
This commit is contained in:
Jeremy Benoist 2019-04-01 14:34:20 +02:00
parent 8a64566298
commit c579ce2306
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
5 changed files with 23 additions and 15 deletions

View file

@ -1076,6 +1076,17 @@ class EntryRestControllerTest extends WallabagApiTestCase
}
public function testGetEntriesExistsWhichDoesNotExists()
{
$this->client->request('GET', '/api/entries/exists?url=http://google.com/entry2');
$this->assertSame(200, $this->client->getResponse()->getStatusCode());
$content = json_decode($this->client->getResponse()->getContent(), true);
$this->assertFalse($content['exists']);
}
public function testGetEntriesExistsWhichDoesNotExistsWithHashedUrl()
{
$this->client->request('GET', '/api/entries/exists?hashed_url=' . hash('sha1', 'http://google.com/entry2'));
@ -1087,6 +1098,13 @@ class EntryRestControllerTest extends WallabagApiTestCase
}
public function testGetEntriesExistsWithNoUrl()
{
$this->client->request('GET', '/api/entries/exists?url=');
$this->assertSame(403, $this->client->getResponse()->getStatusCode());
}
public function testGetEntriesExistsWithNoHashedUrl()
{
$this->client->request('GET', '/api/entries/exists?hashed_url=');