Skip to content

Commit 48c08d1

Browse files
committed
tests: fix tests with new jsonapi-error version
1 parent 0cde8ae commit 48c08d1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/HttpApiValidationTraitTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,19 @@ public function canReturnErrorResponse(): void {
188188
$this->assertEquals(422, $response->getStatusCode());
189189

190190
$expected = json_encode([
191+
'jsonapi' => [
192+
'version' => '1.0',
193+
'meta' => [
194+
'links' => [
195+
'self' => [
196+
'href' => 'http://jsonapi.org/format/1.0/',
197+
],
198+
],
199+
],
200+
],
191201
'errors' => [
192202
[
193-
'status' => 422,
203+
'status' => '422',
194204
'code' => 'validation_error',
195205
'source' => [
196206
'pointer' => '/name',
@@ -202,7 +212,7 @@ public function canReturnErrorResponse(): void {
202212
],
203213
],
204214
[
205-
'status' => 422,
215+
'status' => '422',
206216
'code' => 'validation_error',
207217
'source' => [
208218
'pointer' => '/description',

0 commit comments

Comments
 (0)