From d9b71755935e3cb550c1282d8d2e7d2b8966514f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 11 Feb 2015 18:22:59 +0100 Subject: [PATCH] test if GET /api/entries returns 1 or more results --- .../Tests/Controller/WallabagRestControllerTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php index 50b61234..00b96905 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php @@ -104,6 +104,15 @@ class WallabagRestControllerTest extends WallabagTestCase $headers = $this->generateHeaders('admin', 'test', $salt[0]); $client->request('GET', '/api/entries', array(), array(), $headers); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + + /* var_dump(count(json_decode($client->getResponse()->getContent()))); + var_dump($client->getResponse()->getContent()); + die; +*/ + $this->assertGreaterThanOrEqual(1, count(json_decode($client->getResponse()->getContent()))); + $this->assertContains('Mailjet', $client->getResponse()->getContent()); $this->assertTrue( -- 2.41.0