From: Nicolas LÅ“uillet Date: Tue, 10 Feb 2015 19:07:55 +0000 (+0100) Subject: add test for api/salts X-Git-Tag: 2.0.0-alpha.0~79^2~14 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=f5deb024a2dd5a2cb27263a51f4653609407597e;p=github%2Fwallabag%2Fwallabag.git add test for api/salts --- diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index b6f86707..bedc90d2 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -2,7 +2,6 @@ namespace Wallabag\CoreBundle\Repository; -use Doctrine\ORM\Query; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Tools\Pagination\Paginator; diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php index 0949b92d..d9e6a161 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php @@ -6,7 +6,18 @@ use Symfony\Bundle\FrameworkBundle\Test\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->request('GET', '/api/entries'); $this->assertTrue($client->getResponse()->isOk()); @@ -19,4 +30,4 @@ class WallabagRestControllerTest extends WebTestCase ); $this->assertEquals('[]', $client->getResponse()->getContent()); } -} \ No newline at end of file +}