3fd7845bc8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
692 B
PHP
30 lines
692 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AuthTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
$this->app->make(\Spatie\Permission\PermissionRegistrar::class)->forgetCachedPermissions();
|
|
}
|
|
|
|
public function test_users_table_exists_and_user_can_be_created(): void
|
|
{
|
|
$user = User::create([
|
|
'name' => 'Test Admin',
|
|
'email' => 'admin@test.com',
|
|
'password' => bcrypt('password'),
|
|
]);
|
|
|
|
$this->assertDatabaseHas('users', ['email' => 'admin@test.com']);
|
|
}
|
|
}
|