Expand controller coverage for Phase 1.3#438
Draft
willnet wants to merge 1 commit into
Draft
Conversation
Cover Sorcery::Controller core and controller submodule edge cases so the refactor roadmap has stronger regression protection. Mark Phase 1.3 complete after verifying the full spec suite passes.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Sorcery controller spec suite to cover additional edge cases across Sorcery::Controller core behavior and several controller submodules, and marks Phase 1.3 as completed in the roadmap.
Changes:
- Added specs for
Sorcery::Controllercore behaviors (failure-reason yielding on login failure, directcurrent_userassignment,after_login_lockcallback execution, and invaliduser_classconfiguration). - Added targeted edge-case coverage for controller submodules: session timeout invalidation guards, remember-me cookie/login edge cases, OAuth provider URL/token behaviors and incomplete-user session storage, HTTP Basic auth preconditions and realm lookup, brute-force lock behavior, and activity logging when logged out.
- Updated
V1_ROADMAP.mdto mark Phase 1.3 tasks as complete.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| V1_ROADMAP.md | Marks Phase 1.3 controller coverage work as complete. |
| spec/controllers/sorcery_controller_spec.rb | Adds core controller edge-case coverage (login failure reason yielding, callbacks, config error). |
| spec/controllers/sorcery_controller_session_timeout_spec.rb | Adds guard-condition coverage for invalidate_active_sessions!. |
| spec/controllers/sorcery_controller_remember_me_spec.rb | Adds direct force_forget_me! behavior and missing-cookie login edge case coverage. |
| spec/controllers/sorcery_controller_oauth_spec.rb | Adds OAuth edge-case tests (unsupported providers, callback URL fixups, access_token accessor, incomplete-user session storage, build-from behavior). |
| spec/controllers/sorcery_controller_http_basic_auth_spec.rb | Adds coverage for “explicit request” precondition and unmapped realm lookup. |
| spec/controllers/sorcery_controller_brute_force_protection_spec.rb | Adds coverage for avoiding failed-login increments when already locked. |
| spec/controllers/sorcery_controller_activity_logging_spec.rb | Adds coverage for skipping activity logging when not logged in. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cover Sorcery::Controller core and controller submodule edge cases so the refactor roadmap has stronger regression protection. Mark Phase 1.3 complete after verifying the full spec suite passes.