]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
add test for api/salts
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 10 Feb 2015 19:07:55 +0000 (20:07 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Wed, 11 Feb 2015 05:27:04 +0000 (06:27 +0100)
src/Wallabag/CoreBundle/Repository/EntryRepository.php
src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php

index b6f86707046f72b73b676768d1a1b2640bd97daa..bedc90d2b71060a9a3b9dde51a41f8404797aa77 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Wallabag\CoreBundle\Repository;
 
-use Doctrine\ORM\Query;
 use Doctrine\ORM\EntityRepository;
 use Doctrine\ORM\Tools\Pagination\Paginator;
 
index 0949b92d9ca505504612bbadbfc11d8c38a105a9..d9e6a1618b38205d104b67db1527665a55ecaf78 100644 (file)
@@ -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
+}