<?php

namespace Tests\Unit\Models;

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

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

        $this->assertSame('discount_usages', $model->getTable());
        $this->assertSame('id', $model->getKeyName());
        $this->assertSame(true, $model->timestamps);
        $this->assertSame(["voucher_id", "invoice_id", "parent_id", "discount_amount", "description", "school_year", "updated_by", "used_at", "created_at", "updated_at", "semester"], $model->getFillable());
    }

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