Files
D1041231009-WebGIS-PovertyMap/tests/Feature/AuthTest.php
T
GuavaPopper 3fd7845bc8 feat: add User model and users migration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 19:13:33 +07:00

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']);
}
}