完善桌面端界面、发布检查与邮箱域名同步
Client Quality Gates / Shared client and Web (push) Has been cancelled
Client Quality Gates / macOS Desktop (push) Has been cancelled

This commit is contained in:
Cheng Zhou
2026-07-01 10:49:31 +08:00
parent c923f887a0
commit 9cac75e85c
32 changed files with 5392 additions and 2684 deletions
+16
View File
@@ -70,6 +70,22 @@ async def add_email_settings(SessionLocal, domain: str) -> None:
await session.commit()
@pytest.mark.asyncio
async def test_email_domains_come_only_from_email_service_settings(client_and_db):
client, SessionLocal = client_and_db
empty_response = await client.get("/api/v1/auth/email-domains")
assert empty_response.status_code == 200
assert empty_response.json() == {"items": []}
assert empty_response.headers["cache-control"] == "no-store"
await add_email_settings(SessionLocal, "example.com")
configured_response = await client.get("/api/v1/auth/email-domains")
assert configured_response.status_code == 200
assert configured_response.json() == {"items": ["example.com"]}
assert configured_response.headers["cache-control"] == "no-store"
async def encrypted_auth_payload(client: AsyncClient, email: str, password: str) -> dict:
key_resp = await client.get("/api/v1/auth/login-key")
assert key_resp.status_code == 200