Files
beatbook/tests/Feature/PublicRoutesTest.php
T
2026-09-12 20:45:05 +01:00

29 lines
702 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class PublicRoutesTest extends TestCase
{
use RefreshDatabase;
public function test_public_pages_render(): void
{
foreach (['/', '/djs', '/login', '/register', '/forgot-password', '/privacy', '/cookies', '/terms', '/up'] as $uri) {
$this->get($uri)->assertSuccessful();
}
}
public function test_dashboard_redirects_guests_to_login(): void
{
$this->get('/dashboard')->assertRedirect('/login');
}
public function test_admin_redirects_guests_to_login(): void
{
$this->get('/admin')->assertRedirect('/login');
}
}