crate file test for damage and fix update request and add 2 option in validation

This commit is contained in:
2025-02-22 17:16:05 +03:30
parent 32630f6400
commit b61a3e6452
4 changed files with 69 additions and 8 deletions

View File

@@ -16,20 +16,20 @@ class IndexTest extends TestCase
* A basic feature test example.
*/
public function test_user_should_have_manage_damage_permission_index(): void
public function test_user_should_have_manage_damage_permission_index_damage(): void
{
$user = User::factory()->create();
$response = $this->actingAs($user)->getJson(route('v3.damages.index'));
$response->assertForbidden();
}
public function test_user_cannot_access_authentication(): void
public function test_user_cannot_access_authentication_to_index_damage(): void
{
$response = $this->getJson(route('v3.damages.index'));
$response->assertStatus(401);
}
public function test_all_damages_returned_successfully_for_index(): void
public function test_all_damages_returned_successfully_for_index_damage(): void
{
$user = User::factory()