mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 18:30:17 +01:00
add test for api/salts
This commit is contained in:
parent
68c6f1bd7f
commit
f5deb024a2
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Wallabag\CoreBundle\Repository;
|
namespace Wallabag\CoreBundle\Repository;
|
||||||
|
|
||||||
use Doctrine\ORM\Query;
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Doctrine\ORM\Tools\Pagination\Paginator;
|
use Doctrine\ORM\Tools\Pagination\Paginator;
|
||||||
|
|
||||||
|
@ -6,7 +6,18 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||||||
|
|
||||||
class WallabagRestControllerTest extends WebTestCase
|
class WallabagRestControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
public function testEmptyGetEntries() {
|
public function testGetSalt()
|
||||||
|
{
|
||||||
|
$client = $this->createClient();
|
||||||
|
$client->request('GET', '/api/salts/admin.json');
|
||||||
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||||
|
|
||||||
|
$client->request('GET', '/api/salts/notfound.json');
|
||||||
|
$this->assertEquals(404, $client->getResponse()->getStatusCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testEmptyGetEntries()
|
||||||
|
{
|
||||||
$client = $this->createClient();
|
$client = $this->createClient();
|
||||||
$client->request('GET', '/api/entries');
|
$client->request('GET', '/api/entries');
|
||||||
$this->assertTrue($client->getResponse()->isOk());
|
$this->assertTrue($client->getResponse()->isOk());
|
||||||
@ -19,4 +30,4 @@ class WallabagRestControllerTest extends WebTestCase
|
|||||||
);
|
);
|
||||||
$this->assertEquals('[]', $client->getResponse()->getContent());
|
$this->assertEquals('[]', $client->getResponse()->getContent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user