updates for admin area
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user