21 lines
587 B
PHP
21 lines
587 B
PHP
<?php
|
|
|
|
use App\Models\AuditLog;
|
|
use App\Models\Tenant;
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
it('does not allow legacy platform-superadmin break-glass recovery flow', function () {
|
|
$user = User::factory()->create();
|
|
$this->actingAs($user);
|
|
|
|
$tenant = Tenant::factory()->create();
|
|
|
|
$this->get('/admin/break-glass-recovery')->assertNotFound();
|
|
|
|
expect(AuditLog::query()->where('tenant_id', $tenant->getKey())->where('action', 'tenant_membership.bootstrap_recover')->exists())
|
|
->toBeFalse();
|
|
});
|