<?php

namespace Tests\Unit\Bootstrap;

use App\Domains\Bootstrap\Resources\AdminAppBootstrapResource;
use App\Domains\Tenant\Models\WebsiteType;
use Tests\TestCase;

class AdminAppBootstrapResourceTest extends TestCase
{
    public function test_it_exposes_the_website_type(): void
    {
        $websiteType = new WebsiteType([
            'codigo' => 'shopit',
            'nombre' => 'ShopIt',
            'dominio' => 'admin.shopit.test',
        ]);
        $websiteType->setRelation('siteLogo', null);
        $websiteType->setRelation('footerLogo', null);
        $websiteType->setRelation('favicon', null);
        $data = AdminAppBootstrapResource::make([
            'website_type' => $websiteType,
        ])->resolve(request());

        $this->assertSame('shopit', $data['website_type_code']);
        $this->assertNull($data['favicon']);
        $this->assertArrayNotHasKey('forms', $data);
    }
}
