28 lines
828 B
Python
28 lines
828 B
Python
"""tests/test_tenant_auth.py — Tenant portal authentication tests."""
|
|
|
|
|
|
def test_login_page_loads(tenant_client):
|
|
resp = tenant_client.get("/login")
|
|
assert resp.status_code == 200
|
|
assert b"Salon Login" in resp.data
|
|
|
|
|
|
def test_staff_login_page_loads(tenant_client):
|
|
resp = tenant_client.get("/staff-login")
|
|
assert resp.status_code == 200
|
|
assert b"Staff Login" in resp.data
|
|
|
|
|
|
def test_password_reset_page_loads(tenant_client):
|
|
resp = tenant_client.get("/password-reset")
|
|
assert resp.status_code == 200
|
|
|
|
|
|
def test_login_invalid_credentials(tenant_client):
|
|
resp = tenant_client.post("/login", data={
|
|
"email": "nobody@example.com",
|
|
"password": "wrongpassword",
|
|
}, follow_redirects=True)
|
|
assert resp.status_code == 200
|
|
assert b"Invalid email or password" in resp.data
|