From f5deb024a2dd5a2cb27263a51f4653609407597e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 10 Feb 2015 20:07:55 +0100 Subject: add test for api/salts --- .../Tests/Controller/WallabagRestControllerTest.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Tests') 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 +} -- cgit v1.2.3