From 68c6f1bd7fbf2f01730ee38b1291251494c80eb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 6 Feb 2015 18:02:12 +0100 Subject: [PATCH] Test for GET on empty database --- .../Controller/WallabagRestControllerTest.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php new file mode 100644 index 00000000..0949b92d --- /dev/null +++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php @@ -0,0 +1,22 @@ +createClient(); + $client->request('GET', '/api/entries'); + $this->assertTrue($client->getResponse()->isOk()); + + $this->assertTrue( + $client->getResponse()->headers->contains( + 'Content-Type', + 'application/json' + ) + ); + $this->assertEquals('[]', $client->getResponse()->getContent()); + } +} \ No newline at end of file -- 2.41.0