Skip to content

Feat/test authentication journey#24

Merged
AAdewunmi merged 5 commits into
mainfrom
feat/test-authentication-journey
May 7, 2026
Merged

Feat/test authentication journey#24
AAdewunmi merged 5 commits into
mainfrom
feat/test-authentication-journey

Conversation

@AAdewunmi

Copy link
Copy Markdown
Owner

Summary

Adds focused authentication journey coverage for signup, login, logout, profile access, and user factory behavior.

Changes

  • Expanded auth view integration tests.
  • Covered signup page rendering and successful account creation.
  • Added duplicate email and duplicate username validation tests.
  • Added username generation collision coverage.
  • Added save(commit=False) signup form coverage.
  • Covered authenticated login/signup redirects to the dashboard.
  • Covered logout redirect behavior.
  • Updated user factories for password handling and role assignment.

Behavior

  • Signup creates valid custom users and redirects to the dashboard.
  • Login with email redirects users to the dashboard.
  • Authenticated users are redirected away from login/signup.
  • Logout returns users to the public home page.
  • Anonymous profile access redirects to login with next.
  • Authenticated users can view profile details.
  • User role factories attach roles through studybuddy_roles.

Why

The authentication journey is the first real user path through the product, so it needs reliable coverage before the dashboard becomes the main authenticated surface.

Validation

  • docker compose exec -T web python -m black . --check
  • docker compose exec -T web python -m ruff check .
  • docker compose exec -T web pytest -q
  • Focused auth/user tests passed.

Result

All checks pass. Full suite result: 38 passed.

Notes

This branch is ahead of main and ready to open as a PR from feat/test-authentication-journey.

@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AAdewunmi AAdewunmi merged commit 628cdf6 into main May 7, 2026
2 checks passed
@AAdewunmi AAdewunmi deleted the feat/test-authentication-journey branch May 7, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

Test authentication journey

1 participant