archetecture security fix

This commit is contained in:
root
2026-06-11 03:22:12 -04:00
parent 6def9993da
commit 9483750161
3126 changed files with 177194 additions and 37211 deletions
@@ -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([