From 56da73969ac49e400ade89248f87c643047221d6 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 20 Nov 2016 16:25:13 +0100 Subject: Return an explicit error if reload fail --- tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/Wallabag') diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php index 409a8291..432ce7d8 100644 --- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php @@ -690,7 +690,11 @@ class EntryRestControllerTest extends WallabagApiTestCase } $this->client->request('PATCH', '/api/entries/'.$entry->getId().'/reload.json'); - $this->assertEquals(304, $this->client->getResponse()->getStatusCode()); + $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')); } public function testReloadEntry() -- cgit v1.2.3