archetecture security fix
This commit is contained in:
@@ -110,6 +110,21 @@ class StudentControllerTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_index_returns_students_without_parent_filter(): void
|
||||
{
|
||||
$this->seedConfig();
|
||||
$user = $this->seedUser();
|
||||
$studentId = $this->seedStudent();
|
||||
|
||||
Sanctum::actingAs($user, [], 'api');
|
||||
$response = $this->getJson('/api/v1/students');
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertJsonPath('ok', true);
|
||||
$response->assertJsonPath('students.0.id', $studentId);
|
||||
$response->assertJsonPath('current_year', '2025-2026');
|
||||
}
|
||||
|
||||
private function seedConfig(): void
|
||||
{
|
||||
DB::table('configuration')->insert([
|
||||
|
||||
Reference in New Issue
Block a user