Automated PR for spec 426 exchange teams core evidence identity readiness. Includes service changes and coverage/requirement/spec updates from commit fb4dc20c.
Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #493
33 lines
1.4 KiB
PHP
33 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Models\TenantConfigurationResourceType;
|
|
use App\Services\TenantConfiguration\ClaimGuard;
|
|
use App\Services\TenantConfiguration\ResourceTypeRegistry;
|
|
use App\Support\TenantConfiguration\ClaimState;
|
|
|
|
it('Spec426 persists only internal claim posture for selected Exchange and Teams resource types', function (): void {
|
|
app(ResourceTypeRegistry::class)->syncDefaults();
|
|
|
|
$claimStates = TenantConfigurationResourceType::query()
|
|
->whereIn('canonical_type', ['transportRule', 'acceptedDomain', 'appPermissionPolicy', 'meetingPolicy'])
|
|
->orderBy('canonical_type')
|
|
->get()
|
|
->mapWithKeys(fn (TenantConfigurationResourceType $row): array => [
|
|
(string) $row->canonical_type => $row->default_claim_state,
|
|
])
|
|
->all();
|
|
|
|
expect($claimStates)->toBe([
|
|
'acceptedDomain' => ClaimState::InternalOnly,
|
|
'appPermissionPolicy' => ClaimState::InternalOnly,
|
|
'meetingPolicy' => ClaimState::InternalOnly,
|
|
'transportRule' => ClaimState::InternalOnly,
|
|
])
|
|
->and(app(ClaimGuard::class)->evaluateStatement('Selected Exchange resources are renderable for internal review', internalOperatorOnly: true))
|
|
->toBe(ClaimState::InternalOnly)
|
|
->and(app(ClaimGuard::class)->evaluateStatement('Microsoft 365 customer-ready evidence', internalOperatorOnly: true))
|
|
->toBe(ClaimState::ClaimBlocked);
|
|
});
|