aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-01-15 09:41:18 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-01-15 09:41:18 +0100
commit5419a8368ebb4b4d57f481b842f1fcc576c9149d (patch)
treecd970bb8f3ec5e6487fc1e3bd2de1f89455d3d90 /tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
parent5c331bf0f9ef679aaf91ef29b13120272fcccbf5 (diff)
parentf6b9e883c01196d5aec249f6e8e02e07d0da4089 (diff)
downloadwallabag-5419a8368ebb4b4d57f481b842f1fcc576c9149d.tar.gz
wallabag-5419a8368ebb4b4d57f481b842f1fcc576c9149d.tar.zst
wallabag-5419a8368ebb4b4d57f481b842f1fcc576c9149d.zip
Merge remote-tracking branch 'origin/master' into 2.4
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
index 3696f8f9..1a41338c 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']);