<?php

namespace Tests\Unit\Resources\ClassProgress;

use App\Http\Resources\ClassProgress\ClassProgressReportResource;
use App\Models\ClassProgressReport;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class ClassProgressReportResourceTest extends TestCase
{
    use RefreshDatabase;

    public function test_resource_has_expected_keys(): void
    {
        $report = ClassProgressReport::factory()->create();

        $resource = (new ClassProgressReportResource($report))->toArray(request());

        $this->assertArrayHasKey('id', $resource);
        $this->assertArrayHasKey('subject', $resource);
        $this->assertArrayHasKey('status', $resource);
        $this->assertArrayHasKey('attachments', $resource);
    }
}
