<?php

namespace Tests\Unit\Models;

use App\Models\ExamDraft;
use PHPUnit\Framework\TestCase;

class ExamDraftTest extends TestCase
{
    public function test_model_metadata_is_converted(): void
    {
        $model = new ExamDraft();

        $this->assertSame('exam_drafts', $model->getTable());
        $this->assertSame('id', $model->getKeyName());
        $this->assertSame(true, $model->timestamps);
        $this->assertSame(["teacher_id", "class_section_id", "semester", "school_year", "exam_type", "draft_title", "description", "teacher_file", "teacher_filename", "status", "admin_id", "admin_comments", "reviewed_at", "final_file", "final_filename", "version", "previous_draft_id", "is_legacy", "created_at", "updated_at"], $model->getFillable());
    }

    public function test_model_class_loads(): void
    {
        $this->assertInstanceOf(ExamDraft::class, new ExamDraft());
    }
}
