mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 01:21:03 +00:00
Fix typo & add test
This commit is contained in:
parent
5d39243068
commit
0b174d69d7
2 changed files with 8 additions and 1 deletions
|
@ -40,7 +40,7 @@ class WallabagRestController extends FOSRestController
|
|||
$url = $request->query->get('url', '');
|
||||
|
||||
if (empty($url)) {
|
||||
throw $this->createAccessDeniedException('URL is empty?, logged user id: '.$this->getUser->getId());
|
||||
throw $this->createAccessDeniedException('URL is empty?, logged user id: '.$this->getUser()->getId());
|
||||
}
|
||||
|
||||
$res = $this->getDoctrine()
|
||||
|
|
|
@ -804,4 +804,11 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
|||
|
||||
$this->assertEquals(false, $content['exists']);
|
||||
}
|
||||
|
||||
public function testGetEntriesExistsWithNoUrl()
|
||||
{
|
||||
$this->client->request('GET', '/api/entries/exists?url=');
|
||||
|
||||
$this->assertEquals(403, $this->client->getResponse()->getStatusCode());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue