<?php

namespace Tests\Unit\Resources\Support;

use App\Http\Resources\Support\SupportRequestResource;
use App\Models\SupportRequest;
use Tests\TestCase;

class SupportRequestResourceTest extends TestCase
{
    public function test_resource_returns_expected_shape(): void
    {
        $model = new SupportRequest([
            'id' => 1,
            'user_id' => 2,
            'subject' => 'Help',
            'message' => 'Need help',
            'status' => 'open',
            'semester' => 'Fall',
            'school_year' => '2025-2026',
        ]);

        $payload = (new SupportRequestResource($model))->toArray(request());

        $this->assertSame(1, $payload['id']);
        $this->assertSame('Help', $payload['subject']);
    }
}
