<?php

namespace Tests\Unit\Services\Administrator;

use App\Services\Administrator\TeacherSubmissionSupportService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class TeacherSubmissionSupportServiceTest extends TestCase
{
    use RefreshDatabase;

    public function test_submission_status_labels(): void
    {
        $service = new TeacherSubmissionSupportService();
        $status = $service->submissionStatus(3, 5);

        $this->assertSame('Missing', $status['label']);
        $this->assertFalse($status['completed']);
    }

    public function test_build_missing_items(): void
    {
        $service = new TeacherSubmissionSupportService();
        $items = $service->buildMissingItems([
            'attendance_status' => ['completed' => false],
            'midterm_score_status' => ['completed' => true],
        ]);

        $this->assertSame(['attendance'], $items);
    }
}
