diff --git a/aleksis/core/tests/regression/test_regression.py b/aleksis/core/tests/regression/test_regression.py index c2417a56ebd02c015e84f18401d39cfc582b4252..6d6056ad272fa87c9df9d4cf7ba16f87a70dbf40 100644 --- a/aleksis/core/tests/regression/test_regression.py +++ b/aleksis/core/tests/regression/test_regression.py @@ -146,3 +146,14 @@ def test_no_access_oauth2_client_credentials_without_allowed_scopes(client): ) r = client.get(url, HTTP_AUTHORIZATION=auth_header) assert r.status_code == 200 + + +def test_change_password_not_logged_in(client): + """Tests that CustomPasswordChangeView redirects to login when accessed unauthenticated. + + https://edugit.org/AlekSIS/official/AlekSIS-Core/-/issues/703 + """ + response = client.get(reverse("account_change_password"), follow=True) + + assert response.status_code == 200 + assert "Please login to see this page." in response.content.decode("utf-8")