Summary
Two feature test files reference a role column on the users table and an isAdmin() method that no longer exist in the current schema. These tests likely fail against the current database structure.
Affected Files
Problem
These tests call:
User::factory()->create(['role' => User::ROLE_ADMIN])
$user->isAdmin()
The current User model uses:
- A
super_admin boolean column for platform-level access
- A
role pivot column on project_user for per-project roles
Implementation
Update all references in both test files:
- Replace
['role' => User::ROLE_ADMIN] → ['super_admin' => true]
- Replace
$user->isAdmin() → $user->isSuperAdmin()
- Ensure factory state matches current schema
Acceptance Criteria
Summary
Two feature test files reference a
rolecolumn on theuserstable and anisAdmin()method that no longer exist in the current schema. These tests likely fail against the current database structure.Affected Files
tests/Feature/AuthenticationTest.phptests/Feature/UserRoleAuthorizationTest.phpProblem
These tests call:
The current
Usermodel uses:super_adminboolean column for platform-level accessrolepivot column onproject_userfor per-project rolesImplementation
Update all references in both test files:
['role' => User::ROLE_ADMIN]→['super_admin' => true]$user->isAdmin()→$user->isSuperAdmin()Acceptance Criteria
php artisan testpasses with zero failures in these two filesrolecolumn orisAdmin()method