<?php

namespace Tests\Unit\Resources\Frontend;

use App\Http\Resources\Frontend\PageContentResource;
use Tests\TestCase;

class PageContentResourceTest extends TestCase
{
    public function test_resource_returns_content(): void
    {
        $resource = new PageContentResource([
            'type' => 'privacy_policy',
            'content' => '<h1>Privacy</h1>',
        ]);

        $payload = $resource->toArray(request());

        $this->assertSame('privacy_policy', $payload['type']);
        $this->assertSame('<h1>Privacy</h1>', $payload['content']);
    }
}
