diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-11-22 10:45:17 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-11-22 10:45:19 +0100 |
commit | 5cd0857e3c87541fa8a628b0623b8959bfba2ca8 (patch) | |
tree | bac9d0e78d0908fa3c8e4c22900a6d7b2d456735 /tests | |
parent | 944b8d61752bedd126e1cdaeb3205177e414cf6b (diff) | |
download | wallabag-5cd0857e3c87541fa8a628b0623b8959bfba2ca8.tar.gz wallabag-5cd0857e3c87541fa8a628b0623b8959bfba2ca8.tar.zst wallabag-5cd0857e3c87541fa8a628b0623b8959bfba2ca8.zip |
Return 304 when content isn't reloaded using the API
Previously it was a 400 but this is more related to a real error.
Using the API user should only know the content got reloaded or not.
If reloaded: 200 otherwise: 304.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 432ce7d8..409a8291 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | |||
@@ -690,11 +690,7 @@ class EntryRestControllerTest extends WallabagApiTestCase | |||
690 | } | 690 | } |
691 | 691 | ||
692 | $this->client->request('PATCH', '/api/entries/'.$entry->getId().'/reload.json'); | 692 | $this->client->request('PATCH', '/api/entries/'.$entry->getId().'/reload.json'); |
693 | $this->assertEquals(400, $this->client->getResponse()->getStatusCode()); | 693 | $this->assertEquals(304, $this->client->getResponse()->getStatusCode()); |
694 | |||
695 | $this->assertContains('Error while trying to extract content', $this->client->getResponse()->getContent()); | ||
696 | |||
697 | $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); | ||
698 | } | 694 | } |
699 | 695 | ||
700 | public function testReloadEntry() | 696 | public function testReloadEntry() |