Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion backend/app/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ class LoginRequest(BaseModel):
)
password: str = Field(
...,
min_length=8,
max_length=128,
description="The account password.",
example="supersecret123",
Expand Down
12 changes: 12 additions & 0 deletions backend/tests/test_auth_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ def test_signup_login_and_me_happy_path(client):
}


def test_login_short_password_not_rejected_by_schema(client):
response = client.post(
"/auth/login",
json={
"email": "user@example.com",
"password": "short",
},
)

assert response.status_code != 422


def test_signup_duplicate_email_returns_409(client):
payload = {"email": "dup@example.com", "password": "StrongPass123!"}
first_response = client.post("/auth/signup", json=payload)
Expand Down
Loading