Task 9 - your own validation rule

This commit is contained in:
PovilasKorop
2021-11-29 16:06:54 +02:00
parent 254985ac99
commit 28c2dd8d60
6 changed files with 80 additions and 0 deletions
+5
View File
@@ -104,4 +104,9 @@ class ValidationTest extends TestCase
$response->assertSee('Please enter the name');
}
public function test_custom_validation_rule()
{
$response = $this->post('articles', ['title' => 'lowercase']);
$response->assertSessionHasErrors('title')->assertStatus(302);
}
}