fix: redirect to landing page after logout instead of login page
This commit is contained in:
@@ -65,8 +65,9 @@ def test_login_unknown_user_shows_error(client):
|
||||
assert "Ungültige" in response.text
|
||||
|
||||
|
||||
def test_logout_clears_cookie(client, alice):
|
||||
def test_logout_clears_cookie_and_redirects_to_landing(client, alice):
|
||||
client.post("/auth/login", data={"username": "alice", "password": "secret123"})
|
||||
response = client.get("/auth/logout")
|
||||
assert response.status_code in (302, 303, 307)
|
||||
assert response.headers["location"] == "/"
|
||||
assert response.cookies.get("access_token", "") == ""
|
||||
|
||||
Reference in New Issue
Block a user