diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2019-01-14 22:24:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 22:24:40 +0100 |
commit | f6b9e883c01196d5aec249f6e8e02e07d0da4089 (patch) | |
tree | 904be517d033438c36b29d2b5c3227f630455b0a /tests | |
parent | f083836cc483fea10302a598b0c14cd515d3d0a3 (diff) | |
parent | 78e3fafa3fab86638295fe1ee2a05a559bf56ab1 (diff) | |
download | wallabag-f6b9e883c01196d5aec249f6e8e02e07d0da4089.tar.gz wallabag-f6b9e883c01196d5aec249f6e8e02e07d0da4089.tar.zst wallabag-f6b9e883c01196d5aec249f6e8e02e07d0da4089.zip |
Merge pull request #3841 from wallabag/fix/bad-order-api
Fix bad order parameter in the API
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 58b617f3..2a1d2e15 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | |||
@@ -242,6 +242,15 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
242 | $this->assertSame(2, $content['limit']); | 242 | $this->assertSame(2, $content['limit']); |
243 | } | 243 | } |
244 | 244 | ||
245 | public function testGetStarredEntriesWithBadSort() | ||
246 | { | ||
247 | $this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated', 'order' => 'unknown']); | ||
248 | |||
249 | $this->assertSame(400, $this->client->getResponse()->getStatusCode()); | ||
250 | |||
251 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type')); | ||
252 | } | ||
253 | |||
245 | public function testGetStarredEntries() | 254 | public function testGetStarredEntries() |
246 | { | 255 | { |
247 | $this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated']); | 256 | $this->client->request('GET', '/api/entries', ['starred' => 1, 'sort' => 'updated']); |