1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

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.
This commit is contained in:
Jeremy Benoist 2016-11-22 10:45:17 +01:00
parent 944b8d6175
commit 5cd0857e3c
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
2 changed files with 4 additions and 8 deletions

View file

@ -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()