Skip to content

Commit 13d3475

Browse files
committed
Fix validation assertions for older Laravel versions
1 parent 7353af9 commit 13d3475

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/TaskHandlerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function it_returns_responses_for_empty_payloads($debug)
4646

4747
// Assert
4848
if ($debug) {
49-
$response->assertJsonValidationErrorFor('task');
49+
$response->assertJsonValidationErrors('task');
5050
} else {
5151
$response->assertNotFound();
5252
}
@@ -77,7 +77,7 @@ public function it_returns_responses_for_invalid_json($debug)
7777

7878
// Assert
7979
if ($debug) {
80-
$response->assertJsonValidationErrorFor('task');
80+
$response->assertJsonValidationErrors('task');
8181
$this->assertEquals('The json must be a valid JSON string.', $response->json('errors.json.0'));
8282
} else {
8383
$response->assertNotFound();
@@ -108,7 +108,7 @@ public function it_returns_responses_for_invalid_payloads(string $payload, strin
108108
);
109109

110110
// Assert
111-
$response->assertJsonValidationErrorFor('task.data');
111+
$response->assertJsonValidationErrors('task.data');
112112
$this->assertEquals($expectedMessage, $response->json(['errors', 'task.data', 0]));
113113
}
114114

0 commit comments

Comments
 (0)