diff --git a/backend/tests/test_audit.py b/backend/tests/test_audit.py index b860055..ee70e35 100644 --- a/backend/tests/test_audit.py +++ b/backend/tests/test_audit.py @@ -192,3 +192,33 @@ async def test_audit_log_export_csv(async_client, admin_user, db_session): assert key not in response.text, ( f"forbidden field '{key}' found in CSV export body" ) + + +# --------------------------------------------------------------------------- +# Phase 6.2 Wave 0 xfail stubs — ADMIN-06 audit enrichment + daily exports +# --------------------------------------------------------------------------- + + +async def test_audit_log_includes_user_handle(async_client, admin_user, db_session): + """Audit log items include user_handle and actor_handle strings (D-11)""" + pytest.xfail("Phase 6.2 — not implemented yet") + + +async def test_audit_log_filter_by_handle(async_client, admin_user, db_session): + """GET /api/admin/audit-log?user_handle=X filters to matching entries (D-12)""" + pytest.xfail("Phase 6.2 — not implemented yet") + + +async def test_audit_log_filter_unknown_handle(async_client, admin_user, db_session): + """GET /api/admin/audit-log?user_handle=unknown returns empty items list, not 422 (D-12)""" + pytest.xfail("Phase 6.2 — not implemented yet") + + +async def test_daily_exports_list(async_client, admin_user): + """GET /api/admin/audit-log/daily-exports returns {items: [...]} (D-15)""" + pytest.xfail("Phase 6.2 — not implemented yet") + + +async def test_daily_export_download(async_client, admin_user): + """GET /api/admin/audit-log/daily-exports/{date} returns CSV bytes with Content-Disposition (D-16)""" + pytest.xfail("Phase 6.2 — not implemented yet")