05/06/2026 Initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""tests/test_admin_auth.py — Admin portal authentication tests."""
|
||||
import pytest
|
||||
|
||||
|
||||
def test_login_page_loads(admin_client):
|
||||
resp = admin_client.get("/admin/login")
|
||||
assert resp.status_code == 200
|
||||
assert b"Admin Portal" in resp.data
|
||||
|
||||
|
||||
def test_login_invalid_credentials(admin_client):
|
||||
resp = admin_client.post("/admin/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
|
||||
Reference in New Issue
Block a user