jonnybarnes.uk/tests/Feature/Admin/AdminHomeControllerTest.php
Jonny Barnes 126bb29ae2
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled
Laravel Pint fixes
2025-04-06 17:25:06 +01:00

26 lines
512 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Feature\Admin;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;
class AdminHomeControllerTest extends TestCase
{
use RefreshDatabase;
#[Test]
public function admin_homepage_loads(): void
{
$user = User::factory()->make();
$response = $this->actingAs($user)
->get('/admin');
$response->assertViewIs('admin.welcome');
}
}