@@ -56,8 +56,8 @@ public function testValidationErrorsAreReturned()
5656 $ response = $ this ->actingAs ($ user )->postJson ($ this ->link ($ schedule , '/tasks ' ))->assertStatus (Response::HTTP_UNPROCESSABLE_ENTITY );
5757
5858 foreach (['action ' , 'payload ' , 'time_offset ' ] as $ i => $ field ) {
59- $ response ->assertJsonPath ("errors. {$ i }.code " , $ field === 'payload ' ? 'required_unless ' : 'required ' );
60- $ response ->assertJsonPath ("errors. {$ i }.source.field " , $ field );
59+ $ response ->assertJsonPath ("errors. {$ i }.meta.rule " , $ field === 'payload ' ? 'required_unless ' : 'required ' );
60+ $ response ->assertJsonPath ("errors. {$ i }.meta.source_field " , $ field );
6161 }
6262
6363 $ this ->actingAs ($ user )->postJson ($ this ->link ($ schedule , '/tasks ' ), [
@@ -67,15 +67,15 @@ public function testValidationErrorsAreReturned()
6767 ])
6868 ->assertStatus (Response::HTTP_UNPROCESSABLE_ENTITY )
6969 ->assertJsonPath ('errors.0.meta.rule ' , 'in ' )
70- ->assertJsonPath ('errors.0.source.field ' , 'action ' );
70+ ->assertJsonPath ('errors.0.meta.source_field ' , 'action ' );
7171
7272 $ this ->actingAs ($ user )->postJson ($ this ->link ($ schedule , '/tasks ' ), [
7373 'action ' => 'command ' ,
7474 'time_offset ' => 0 ,
7575 ])
7676 ->assertStatus (Response::HTTP_UNPROCESSABLE_ENTITY )
7777 ->assertJsonPath ('errors.0.meta.rule ' , 'required_unless ' )
78- ->assertJsonPath ('errors.0.source.field ' , 'payload ' );
78+ ->assertJsonPath ('errors.0.meta.source_field ' , 'payload ' );
7979
8080 $ this ->actingAs ($ user )->postJson ($ this ->link ($ schedule , '/tasks ' ), [
8181 'action ' => 'command ' ,
@@ -85,7 +85,7 @@ public function testValidationErrorsAreReturned()
8585 ])
8686 ->assertStatus (Response::HTTP_UNPROCESSABLE_ENTITY )
8787 ->assertJsonPath ('errors.0.meta.rule ' , 'numeric ' )
88- ->assertJsonPath ('errors.0.source.field ' , 'sequence_id ' );
88+ ->assertJsonPath ('errors.0.meta.source_field ' , 'sequence_id ' );
8989 }
9090
9191 /**
0 commit comments