test(tenant): cover split website types and migration

This commit is contained in:
2026-09-17 14:25:54 -03:00
parent 6bc784519f
commit 486129a92f
36 changed files with 335 additions and 307 deletions

View File

@@ -3,7 +3,7 @@
namespace Tests\Feature\Tenant;
use App\Domains\Attachable\Models\Attachment;
use App\Domains\Tenant\Models\WebsiteType;
use App\Domains\Tenant\Models\AdminWebsiteType;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
@@ -16,7 +16,7 @@ class BootstrapScannerControllerTest extends TestCase
$siteLogo = Attachment::factory()->create();
$favicon = Attachment::factory()->create();
WebsiteType::query()->create([
AdminWebsiteType::query()->create([
'codigo' => 'shopit',
'nombre' => 'ShopIt',
'dominio' => 'admin.shopit.test',
@@ -39,7 +39,7 @@ class BootstrapScannerControllerTest extends TestCase
$this->getJson('/api/v1/scanner/bootstrap/SCANNER.SHOPIT.TEST')
->assertOk()
->assertJsonPath('data.website_type_code', 'shopit')
->assertJsonPath('data.admin_website_type_code', 'shopit')
->assertJsonPath('data.site_title', 'ShopIt Website Type')
->assertJsonPath('data.primary_color', '#112233')
->assertJsonPath('data.site_logo', $siteLogo->getTemporaryUrl(1440))
@@ -53,7 +53,7 @@ class BootstrapScannerControllerTest extends TestCase
public function test_it_does_not_match_the_admin_app_domain(): void
{
WebsiteType::query()->create([
AdminWebsiteType::query()->create([
'codigo' => 'shopit',
'nombre' => 'ShopIt',
'dominio' => 'admin.shopit.test',