From 09d8bb6fa26b881da478df4c7b97620cb7aea0d0 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 11 Mar 2016 17:56:41 +0100 Subject: Improve tests - add more tests for coverage - add a test on annotation deletion - fix post annontation with ranges --- .../ApiBundle/Tests/Controller/WallabagRestControllerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Wallabag/ApiBundle') diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php index a705f9de..cce39d0b 100644 --- a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php @@ -162,12 +162,12 @@ class WallabagRestControllerTest extends WallabagApiTestCase $this->assertCount(1, $content['tags']); } - public function testPostArchivedEntry() + public function testPostArchivedAndStarredEntry() { $this->client->request('POST', '/api/entries.json', array( 'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', 'archive' => true, - 'starred' => false, + 'starred' => true, )); $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); @@ -177,7 +177,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase $this->assertGreaterThan(0, $content['id']); $this->assertEquals('http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', $content['url']); $this->assertEquals(true, $content['is_archived']); - $this->assertEquals(false, $content['is_starred']); + $this->assertEquals(true, $content['is_starred']); } public function testPatchEntry() -- cgit v1.2.3