diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-11 17:56:41 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-11 17:59:42 +0100 |
commit | 09d8bb6fa26b881da478df4c7b97620cb7aea0d0 (patch) | |
tree | 2a81d844c253c5961943ba936445b154d4d32510 /src/Wallabag/ApiBundle/Tests | |
parent | 66e2be23717ad8af3cabe5d0c69effd492af3ece (diff) | |
download | wallabag-09d8bb6fa26b881da478df4c7b97620cb7aea0d0.tar.gz wallabag-09d8bb6fa26b881da478df4c7b97620cb7aea0d0.tar.zst wallabag-09d8bb6fa26b881da478df4c7b97620cb7aea0d0.zip |
Improve tests
- add more tests for coverage
- add a test on annotation deletion
- fix post annontation with ranges
Diffstat (limited to 'src/Wallabag/ApiBundle/Tests')
-rw-r--r-- | src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php | 6 |
1 files changed, 3 insertions, 3 deletions
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 | |||
162 | $this->assertCount(1, $content['tags']); | 162 | $this->assertCount(1, $content['tags']); |
163 | } | 163 | } |
164 | 164 | ||
165 | public function testPostArchivedEntry() | 165 | public function testPostArchivedAndStarredEntry() |
166 | { | 166 | { |
167 | $this->client->request('POST', '/api/entries.json', array( | 167 | $this->client->request('POST', '/api/entries.json', array( |
168 | 'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', | 168 | 'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', |
169 | 'archive' => true, | 169 | 'archive' => true, |
170 | 'starred' => false, | 170 | 'starred' => true, |
171 | )); | 171 | )); |
172 | 172 | ||
173 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); | 173 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
@@ -177,7 +177,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase | |||
177 | $this->assertGreaterThan(0, $content['id']); | 177 | $this->assertGreaterThan(0, $content['id']); |
178 | $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']); | 178 | $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']); |
179 | $this->assertEquals(true, $content['is_archived']); | 179 | $this->assertEquals(true, $content['is_archived']); |
180 | $this->assertEquals(false, $content['is_starred']); | 180 | $this->assertEquals(true, $content['is_starred']); |
181 | } | 181 | } |
182 | 182 | ||
183 | public function testPatchEntry() | 183 | public function testPatchEntry() |