33 lines
950 B
PHP
33 lines
950 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Models\Tenant;
|
|
|
|
it('serves the managed-tenant list route without a tenant route prefix', function (): void {
|
|
$tenant = Tenant::factory()->create();
|
|
[$user] = createUserWithTenant($tenant, role: 'owner');
|
|
|
|
$this->actingAs($user)
|
|
->get('/admin/managed-tenants')
|
|
->assertOk();
|
|
});
|
|
|
|
it('serves the managed-tenant view route without a tenant route prefix', function (): void {
|
|
$tenant = Tenant::factory()->create();
|
|
[$user] = createUserWithTenant($tenant, role: 'owner');
|
|
|
|
$this->actingAs($user)
|
|
->get("/admin/managed-tenants/{$tenant->id}")
|
|
->assertOk();
|
|
});
|
|
|
|
it('serves the managed-tenant edit route without a tenant route prefix', function (): void {
|
|
$tenant = Tenant::factory()->create();
|
|
[$user] = createUserWithTenant($tenant, role: 'owner');
|
|
|
|
$this->actingAs($user)
|
|
->get("/admin/managed-tenants/{$tenant->id}/edit")
|
|
->assertOk();
|
|
});
|