Files
shopit-back/tests/Unit/Bootstrap/AdminAppBootstrapResourceTest.php

28 lines
817 B
PHP

<?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);
$data = AdminAppBootstrapResource::make([
'website_type' => $websiteType,
])->resolve(request());
$this->assertSame('shopit', $data['website_type_code']);
$this->assertArrayNotHasKey('forms', $data);
}
}