mirror of
https://github.com/10h30/Test-Laravel-Validation.git
synced 2026-06-05 15:07:56 +09:00
Task 4 - showing specific validation error
This commit is contained in:
@@ -51,4 +51,12 @@ class ValidationTest extends TestCase
|
||||
$response->assertSee('The name field is required.');
|
||||
$response->assertSee('The description field is required.');
|
||||
}
|
||||
|
||||
public function test_validation_specific_error_shown_in_blade()
|
||||
{
|
||||
// Post without name should fail
|
||||
$response = $this->followingRedirects()->post('products');
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('The name field is required.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user