Redirect to home after login, which redirects elsewhere
This commit is contained in:
@@ -8,12 +8,12 @@ def test_user_with_workspaces_has_workspaces_nav(client, user_session):
|
||||
Workspaces._create_workspace_role(user, workspace, "default")
|
||||
|
||||
user_session(user)
|
||||
response = client.get("/home")
|
||||
response = client.get("/home", follow_redirects=True)
|
||||
assert b'href="/workspaces"' in response.data
|
||||
|
||||
|
||||
def test_user_without_workspaces_has_no_workspaces_nav(client, user_session):
|
||||
user = UserFactory.create()
|
||||
user_session(user)
|
||||
response = client.get("/home")
|
||||
response = client.get("/home", follow_redirects=True)
|
||||
assert b'href="/workspaces"' not in response.data
|
||||
|
@@ -33,7 +33,7 @@ def test_successful_login_redirect_non_ccpo(client, monkeypatch):
|
||||
)
|
||||
|
||||
assert resp.status_code == 302
|
||||
assert "requests" in resp.headers["Location"]
|
||||
assert "home" in resp.headers["Location"]
|
||||
assert session["user_id"]
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ def test_successful_login_redirect_ccpo(client, monkeypatch):
|
||||
)
|
||||
|
||||
assert resp.status_code == 302
|
||||
assert "requests" in resp.headers["Location"]
|
||||
assert "home" in resp.headers["Location"]
|
||||
assert session["user_id"]
|
||||
|
||||
|
||||
@@ -119,8 +119,6 @@ def test_crl_validation_on_login(client):
|
||||
"HTTP_X_SSL_CLIENT_CERT": good_cert,
|
||||
},
|
||||
)
|
||||
assert resp.status_code == 302
|
||||
assert "requests" in resp.headers["Location"]
|
||||
assert session["user_id"]
|
||||
|
||||
|
||||
|
@@ -5,7 +5,6 @@ import pytest
|
||||
"path",
|
||||
(
|
||||
"/",
|
||||
"/home",
|
||||
"/workspaces",
|
||||
"/requests",
|
||||
"/requests/new/1",
|
||||
|
Reference in New Issue
Block a user