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:
parent
8a64566298
commit
c579ce2306
5 changed files with 23 additions and 15 deletions
|
@ -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=');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue