Task 5 - old values staying in the form

This commit is contained in:
PovilasKorop
2021-11-29 13:41:46 +02:00
parent 7d3ccdd6ec
commit b7eaace432
7 changed files with 103 additions and 0 deletions
+8
View File
@@ -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');
}
}