test: add tests for WorkspaceController API endpoints #83

Open
Charon wants to merge 2 commits from feat/test-workspace-controller into dev

2 commits

Author SHA1 Message Date
Claude
814b7fecc7
test: add WorkspaceController API endpoint tests
Add comprehensive feature tests for WorkspaceController covering all
CRUD operations and workspace switching logic. 46 tests with 97
assertions verify: listing with pagination/filtering/search, show with
access control, create with owner attachment, update with role-based
permissions (owner/admin/member/outsider), delete with ownership and
single-workspace guards, switch with hub-domain scoping and transaction
atomicity, and current workspace resolution with fallback.

Fixes #29

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:57:32 +00:00
Claude
6e9afdb766
chore: add IDE helper annotations to Eloquent models
Add @property, @property-read, @method, and @mixin PHPDoc annotations
to the seven core Eloquent models for IDE autocompletion support.

Models annotated:
- Workspace: all columns, relationships, scopes (active, ordered)
- User: all columns, relationships, factory
- WorkspaceMember: relationship props, scope methods (forWorkspace, forUser, withRole, inTeam, owners)
- WorkspaceInvitation: all columns, relationships, scopes (pending, expired, accepted)
- Namespace_: all columns, relationships, scopes (active, ordered, ownedByUser, ownedByWorkspace, accessibleBy)
- Package: all columns, relationships, scopes (active, public, base, addons, purchasable, free, ordered)
- Feature: all columns, relationships, scopes (active, inCategory, root)

Fixes #31

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:55:08 +00:00