TenantAtlas/tests/Feature/Models/TenantGraphOptionsKillSwitchTest.php

18 lines
452 B
PHP

<?php
use App\Models\Tenant;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
it('throws when Tenant::graphOptions is called', function (): void {
$tenant = Tenant::factory()->create([
'app_client_id' => 'legacy-client-id',
'app_client_secret' => 'legacy-client-secret',
]);
$call = fn (): array => $tenant->graphOptions();
expect($call)->toThrow(BadMethodCallException::class);
});