getJson(route('v3.damages.list')); $response->assertStatus(401); } public function test_all_damages_returned_successfully_for_list(): void { $user = User::factory()->create(); Damage::factory()->count(5)->create(); $response = $this->actingAs($user)->getJson(route('v3.damages.list')); $response->assertOk(); $response->assertJsonStructure([ 'data' => [ '*' => [ 'id', 'title', 'unit', 'base_price', 'status', ], ], ]); } }