canvas-website/tests
Jeff Emmett 00a21f9610 feat: add worker unit tests for board permissions
Comprehensive test coverage for the board permissions system:
- handleGetPermission (authenticated/unauthenticated users)
- handleListPermissions (admin filtering)
- handleGrantPermission (editor assignment)
- handleRevokePermission (editor removal)
- handleUpdateBoard (protected status, global access)
- handleCreateAccessToken (security validation)
- handleListAccessTokens (admin-only access)
- handleRevokeAccessToken (token deletion)
- handleGetGlobalAdminStatus (admin checks)
- handleGetBoardInfo (board metadata)
- handleListEditors (editor listing)

Tests cover key security scenarios:
- Anonymous users get edit on new boards (permission model)
- Protected boards require authentication
- Access tokens cannot grant admin permissions
- View permission returned when database unavailable (secure default)

30 tests total, all passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 02:58:22 -05:00
..
e2e feat: add comprehensive test suite for CRDT, offline storage, and auth 2025-12-18 02:42:01 -05:00
mocks feat: add comprehensive test suite for CRDT, offline storage, and auth 2025-12-18 02:42:01 -05:00
unit feat: add comprehensive test suite for CRDT, offline storage, and auth 2025-12-18 02:42:01 -05:00
worker feat: add worker unit tests for board permissions 2025-12-18 02:58:22 -05:00
setup.ts feat: add comprehensive test suite for CRDT, offline storage, and auth 2025-12-18 02:42:01 -05:00