<?php

namespace Tests\Unit\Tenant;

use App\Domains\Tenant\Models\WebsiteType;
use App\Domains\Tenant\Resources\AdminApp\BootstrapAdminAppResource;
use Tests\TestCase;

class BootstrapAdminAppResourceTest extends TestCase
{
    public function test_it_exposes_the_website_type_code(): void
    {
        $websiteType = new WebsiteType([
            'codigo' => 'shopit',
            'nombre' => 'ShopIt',
            'dominio' => 'admin.shopit.test',
        ]);
        $websiteType->setRelation('siteLogo', null);

        $data = BootstrapAdminAppResource::make($websiteType)->resolve(request());

        $this->assertSame('shopit', $data['codigo']);
        $this->assertSame('shopit', $data['website_type_code']);
    }
}
