TenantAtlas/tests/Feature/Auth/DbOnlyPagesDoNotMakeHttpRequestsTest.php
2026-01-27 17:22:33 +01:00

22 lines
517 B
PHP

<?php
declare(strict_types=1);
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
uses(RefreshDatabase::class);
it('does not make outbound HTTP requests when rendering db-only auth pages', function () {
Http::preventStrayRequests();
$this->get('/admin/login')->assertOk();
$user = User::factory()->create();
$this->actingAs($user);
$this->get('/admin/no-access')->assertOk();
$this->get('/admin/choose-tenant')->assertOk();
});