Skip to content

Commit f5f140a

Browse files
committed
Consider not found test to return html as a web page might be returned instead of plain error
1 parent 02a0d78 commit f5f140a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/Fixtures/Saloon/extract-text-non-existing.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"headers": {
44
"content-type": "application\/json"
55
},
6-
"data": "{\"detail\":\"File not found at given url.\"}"
6+
"data": "{\"detail\":\"Unsupported mime type 'text\/html'. Expecting application\/pdf.\"}"
77
}

tests/ParseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172

173173
$mockClient->assertSentCount(1);
174174

175-
})->throws(UnprocessableEntityException::class, 'File not found at given url.');
175+
})->throws(UnprocessableEntityException::class, 'Unprocessable Entity (422) Response: {"detail":"Unsupported mime type \'text/html\'. Expecting application/pdf."}');
176176

177177
test('handle pdfact not available', function () {
178178
$mockClient = MockClient::global([

0 commit comments

Comments
 (0)