Skip to content

Phase 1: Fix stale/broken feature tests #6

@dkwiebe

Description

@dkwiebe

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

  • php artisan test passes with zero failures in these two files
  • No test references removed role column or isAdmin() method

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions