feat: add User model and users migration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
GuavaPopper
2026-06-02 19:13:33 +07:00
parent f82b36ccc7
commit 3fd7845bc8
3 changed files with 79 additions and 0 deletions
+29
View File
@@ -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']);
}
}