hoàn thành 58 test case

This commit is contained in:
2026-04-08 15:52:56 +07:00
parent c138adb108
commit 18ec75071c
13 changed files with 588 additions and 6 deletions
+8
View File
@@ -15,6 +15,14 @@ class AdminLoginTest extends DuskTestCase
protected function setUp(): void
{
parent::setUp();
// Bảo vệ chống duplicate từ lần chạy bị interrupt trước đó
$stale = User::where('email', 'dusk_admin_test@test.local')->first();
if ($stale) {
UserRole::where('user_id', $stale->id)->delete();
$stale->delete();
}
// Tạo admin test user với đầy đủ roles
$this->adminUser = User::create([
'name' => 'DUSK ADMIN TEST',