refactor: Improve note ID validation and error handling
- Improve input validation and error handling in Note model - Add test case for out-of-range note IDs in NotesController
This commit is contained in:
parent
d47c8c00f3
commit
71cb15d007
3 changed files with 15 additions and 0 deletions
|
@ -73,4 +73,11 @@ class NotesControllerTest extends TestCase
|
|||
$response = $this->get('/notes/112233');
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function checkNoteIdNotOutOfRange(): void
|
||||
{
|
||||
$response = $this->get('/notes/photou-photologo');
|
||||
$response->assertNotFound();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue