TenantAtlas/apps/platform/tests/Unit/Factories/TenantFactoryTest.php
2026-04-16 15:57:39 +02:00

20 lines
565 B
PHP

<?php
declare(strict_types=1);
use App\Models\Tenant;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
it('can create tenants without provisioning a workspace graph when the minimal state is explicit', function (): void {
$tenant = Tenant::factory()->minimal()->create();
expect($tenant->workspace_id)->toBeNull();
});
it('keeps the default tenant factory path workspace-ready for existing callers', function (): void {
$tenant = Tenant::factory()->create();
expect($tenant->workspace_id)->not->toBeNull();
});