Skip to content

Commit 220b6bd

Browse files
authored
Consider not found test to return html page instead of plain error (#8)
1 parent 02a0d78 commit 220b6bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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)