feat: enhance header context handling and add login page test
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s

- Updated `header.html` to use `with` block for `active` context variable fallback
- Added test to verify login page renders correctly without `active` context
This commit is contained in:
2026-04-21 15:36:44 +02:00
parent 3838fa2480
commit fba29b7a6c
2 changed files with 8 additions and 0 deletions

View File

@@ -12,6 +12,12 @@ User = get_user_model()
@override_settings(EMAIL_BACKEND="django.core.mail.backends.locmem.EmailBackend")
class UserAuthFlowTests(TestCase):
def test_login_page_renders_without_active_context(self):
response = self.client.get(reverse("users:login"))
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "users/login.html")
def test_registration_creates_inactive_user_and_sends_activation_email(self):
response = self.client.post(
reverse("users:register"),