diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-09 13:55:31 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-09 13:55:31 +0200 |
commit | 54c2d164a362e64a320438b439bf9dd6d2c02424 (patch) | |
tree | dc25a86685524e642cedfd95d02736ef06b28f77 /tests | |
parent | b28c5430efefa63d04d87404c99798e82d0427e4 (diff) | |
parent | c829b06ed8f757f2b96515eb872f9ccf20363c94 (diff) | |
download | wallabag-54c2d164a362e64a320438b439bf9dd6d2c02424.tar.gz wallabag-54c2d164a362e64a320438b439bf9dd6d2c02424.tar.zst wallabag-54c2d164a362e64a320438b439bf9dd6d2c02424.zip |
Merge remote-tracking branch 'origin/master' into 2.3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 362c269b..4f49f040 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | |||
@@ -156,6 +156,22 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
156 | $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); | 156 | $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); |
157 | } | 157 | } |
158 | 158 | ||
159 | public function testGetEntriesOnPageTwo() | ||
160 | { | ||
161 | $this->client->request('GET', '/api/entries', [ | ||
162 | 'page' => 2, | ||
163 | 'perPage' => 2, | ||
164 | ]); | ||
165 | |||
166 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); | ||
167 | |||
168 | $content = json_decode($this->client->getResponse()->getContent(), true); | ||
169 | |||
170 | $this->assertGreaterThanOrEqual(0, $content['total']); | ||
171 | $this->assertEquals(2, $content['page']); | ||
172 | $this->assertEquals(2, $content['limit']); | ||
173 | } | ||
174 | |||
159 | public function testGetStarredEntries() | 175 | public function testGetStarredEntries() |
160 | { | 176 | { |
161 | $this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated']); | 177 | $this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated']); |