<?php

namespace Tests\Unit\Services\AttendanceTracking;

use App\Services\AttendanceTracking\AttendanceCaseQueryService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Mockery;
use Tests\TestCase;

class AttendanceCaseQueryServiceTest extends TestCase
{
    use RefreshDatabase;

    public function test_returns_not_found_when_student_missing(): void
    {
        $service = new AttendanceCaseQueryService(
            new \App\Models\Student(),
            new \App\Models\AttendanceData(),
            new \App\Models\AttendanceTracking(),
            Mockery::mock(\App\Services\AttendanceTracking\ViolationRuleEngineService::class),
            Mockery::mock(\App\Services\AttendanceTracking\AttendanceParentLookupService::class)
        );

        $result = $service->getStudentCase(999);

        $this->assertFalse($result['success']);
        $this->assertSame(404, $result['status']);
    }
}
