aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ApiBundle
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ApiBundle')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
index deafd1fa..0a65f9ce 100644
--- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
@@ -157,6 +157,22 @@ class EntryRestControllerTest extends WallabagApiTestCase
157 $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); 157 $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type'));
158 } 158 }
159 159
160 public function testGetEntriesOnPageTwo()
161 {
162 $this->client->request('GET', '/api/entries', [
163 'page' => 2,
164 'perPage' => 2,
165 ]);
166
167 $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
168
169 $content = json_decode($this->client->getResponse()->getContent(), true);
170
171 $this->assertGreaterThanOrEqual(0, $content['total']);
172 $this->assertEquals(2, $content['page']);
173 $this->assertEquals(2, $content['limit']);
174 }
175
160 public function testGetStarredEntries() 176 public function testGetStarredEntries()
161 { 177 {
162 $this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated']); 178 $this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated']);