feat: add User model and users migration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user