test: add 113 unit tests for backend coverage #45

Merged
chihlasm merged 1 commits from test/backend-coverage into main 2026-02-08 23:01:31 +00:00
chihlasm commented 2026-02-08 22:59:05 +00:00 (Migrated from github.com)

Summary

  • 59 permission unit tests covering all functions in app.core.permissions (role hierarchy, content creation, tree/step/tag/category RBAC)
  • 25 tree validation tests covering validate_tree_structure, can_publish_tree, and TreeValidationError
  • 29 settings/webhook tests covering SettingsManager._parse_value, _infer_type, and all 5 Stripe webhook handler stubs

Results

  • All 328 tests pass (189 integration + 113 new unit + 26 export security)
  • Coverage: 63% → 65% overall
  • Key modules now at 100%: permissions.py, tree_validation.py, stripe_handlers.py

Test plan

  • All 113 new unit tests pass (0.26s, no DB required)
  • Full suite passes: 328 tests in 5:03
  • No regressions in existing tests

🤖 Generated with Claude Code

## Summary - **59 permission unit tests** covering all functions in `app.core.permissions` (role hierarchy, content creation, tree/step/tag/category RBAC) - **25 tree validation tests** covering `validate_tree_structure`, `can_publish_tree`, and `TreeValidationError` - **29 settings/webhook tests** covering `SettingsManager._parse_value`, `_infer_type`, and all 5 Stripe webhook handler stubs ## Results - All 328 tests pass (189 integration + 113 new unit + 26 export security) - Coverage: 63% → 65% overall - Key modules now at 100%: `permissions.py`, `tree_validation.py`, `stripe_handlers.py` ## Test plan - [x] All 113 new unit tests pass (0.26s, no DB required) - [x] Full suite passes: 328 tests in 5:03 - [x] No regressions in existing tests 🤖 Generated with [Claude Code](https://claude.com/claude-code)
railway-app[bot] commented 2026-02-08 22:59:17 +00:00 (Migrated from github.com)

🚅 Deployed to the patherly-pr-45 environment in selfless-grace

Service Status Web Updated (UTC)
patherly Success (View Logs) Feb 8, 2026 at 11:00 pm
hopeful-liberation Success (View Logs) Feb 8, 2026 at 11:00 pm
<!-- railway-bot-comment-version=2 --> <!-- railway-project-id="22b9b58c-271b-42e5-a10e-6fdec8d00134" railway-project-name="selfless-grace" --> 🚅 Deployed to the [patherly-pr-45](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134?environmentId=be62f300-8bea-4005-9fb1-12d4c9d0eec0) environment in **[selfless-grace](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134)** | **Service** | **Status** | **Web** | **Updated** (UTC) | | :--- | :--- | :--- | :--- | | patherly | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/95f556ff-5264-4116-a0c2-618a2fc53ba4?id=4ef96e5e-4c20-4468-a8e4-371cfbfbff77&environmentId=be62f300-8bea-4005-9fb1-12d4c9d0eec0)) | | Feb 8, 2026 at 11:00 pm | | hopeful-liberation | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/e1db2ee3-d241-4f45-abe4-c9c5fdf483d5?id=872c22cd-1394-42c0-bc71-ff07f5c7fa1b&environmentId=be62f300-8bea-4005-9fb1-12d4c9d0eec0)) | | Feb 8, 2026 at 11:00 pm |
Sign in to join this conversation.