Allow superadmin to bypass onboarding billing
This commit is contained in:
30
tests/Feature/TenantPackageTest.php
Normal file
30
tests/Feature/TenantPackageTest.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user