Allow superadmin to bypass onboarding billing

This commit is contained in:
Codex Agent
2026-01-25 00:05:34 +01:00
parent 4e65fe1d5f
commit 6c857b5765
6 changed files with 76 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace Tests\Feature;
use App\Models\Package;
use App\Models\Tenant;
use App\Models\TenantPackage;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class TenantPackageTest extends TestCase
{
use RefreshDatabase;
public function test_missing_price_defaults_to_package_price(): void
{
$tenant = Tenant::factory()->create();
$package = Package::factory()->create([
'price' => 123.45,
]);
$tenantPackage = TenantPackage::create([
'tenant_id' => $tenant->id,
'package_id' => $package->id,
'active' => true,
])->refresh();
$this->assertSame('123.45', $tenantPackage->price);
}
}