From 5cd0857e3c87541fa8a628b0623b8959bfba2ca8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 22 Nov 2016 10:45:17 +0100 Subject: 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. --- tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/Wallabag/ApiBundle/Controller') 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 } $this->client->request('PATCH', '/api/entries/'.$entry->getId().'/reload.json'); - $this->assertEquals(400, $this->client->getResponse()->getStatusCode()); - - $this->assertContains('Error while trying to extract content', $this->client->getResponse()->getContent()); - - $this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-Type')); + $this->assertEquals(304, $this->client->getResponse()->getStatusCode()); } public function testReloadEntry() -- cgit v1.2.3