21 lines
700 B
PHP
21 lines
700 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Models\ProviderConnection;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
it('keeps the explicit minimal provider connection state free of credential side effects', function (): void {
|
|
$connection = ProviderConnection::factory()->minimal()->create();
|
|
|
|
expect($connection->credential()->exists())->toBeFalse();
|
|
});
|
|
|
|
it('can opt into a heavier provider graph with a checked-in factory state', function (): void {
|
|
$connection = ProviderConnection::factory()->withCredential()->create();
|
|
|
|
expect($connection->credential()->exists())->toBeTrue()
|
|
->and($connection->refresh()->is_default)->toBeTrue();
|
|
}); |