mirror of
https://github.com/10h30/Test-Laravel-Validation.git
synced 2026-06-05 15:07:56 +09:00
Task 5 - old values staying in the form
This commit is contained in:
@@ -59,4 +59,12 @@ class ValidationTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('The name field is required.');
|
||||
}
|
||||
|
||||
public function test_old_value_stays_in_form_after_validation_error()
|
||||
{
|
||||
// Post without name should fail
|
||||
$response = $this->followingRedirects()->post('teams', ['name' => 'Abc']);
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('Abc');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user