diff options
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index 3cfb8a77..e9cd8c93 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php | |||
@@ -33,7 +33,7 @@ class WallabagRestController extends Controller | |||
33 | throw $this->createNotFoundException(); | 33 | throw $this->createNotFoundException(); |
34 | } | 34 | } |
35 | 35 | ||
36 | return array($user->getSalt()); | 36 | return array($user->getSalt() ?: null); |
37 | } | 37 | } |
38 | /** | 38 | /** |
39 | * Retrieve all entries. It could be filtered by many options. | 39 | * Retrieve all entries. It could be filtered by many options. |
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php index 298cf10c..815903fa 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php | |||
@@ -35,6 +35,7 @@ class WallabagRestControllerTest extends WallabagTestCase | |||
35 | $client = $this->createClient(); | 35 | $client = $this->createClient(); |
36 | $client->request('GET', '/api/salts/admin.json'); | 36 | $client->request('GET', '/api/salts/admin.json'); |
37 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | 37 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
38 | $this->assertNotEmpty(json_decode($client->getResponse()->getContent())); | ||
38 | 39 | ||
39 | $client->request('GET', '/api/salts/notfound.json'); | 40 | $client->request('GET', '/api/salts/notfound.json'); |
40 | $this->assertEquals(404, $client->getResponse()->getStatusCode()); | 41 | $this->assertEquals(404, $client->getResponse()->getStatusCode()); |