Root url should redirect if user is already logged in
This commit is contained in:
6
tests/routes/test_root.py
Normal file
6
tests/routes/test_root.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from tests.factories import UserFactory
|
||||
|
||||
def test_root_redirects_if_user_is_logged_in(client, user_session):
|
||||
user_session(UserFactory.create())
|
||||
response = client.get("/", follow_redirects=False)
|
||||
assert "home" in response.location
|
Reference in New Issue
Block a user