feat(website-type): implement BootstrapWebsiteTypeController and related request/resource for domain-based bootstrapping
This commit is contained in:
25
tests/Unit/Tenant/BootstrapAdminAppResourceTest.php
Normal file
25
tests/Unit/Tenant/BootstrapAdminAppResourceTest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user