mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 00:24:59 -06:00
fix(tests): update all test routes to use /api prefix
All API routes were moved under /api prefix as part of the unified deployment architecture. Updated test files to reflect this change: - basics.rs: Update root and auth/providers routes - health.rs: Update health endpoint routes - oauth.rs: Update all OAuth and auth callback routes, plus redirect locations - sessions.rs: Update profile and logout routes This fixes 9 failing tests that were expecting routes without the /api prefix.
This commit is contained in:
@@ -10,7 +10,7 @@ async fn test_health_endpoint() {
|
||||
let TestContext { server, container, .. } = test_context().use_database(true).call().await;
|
||||
|
||||
// First, verify health endpoint works when database is healthy
|
||||
let response = server.get("/health").await;
|
||||
let response = server.get("/api/health").await;
|
||||
assert_eq!(response.status_code(), 200);
|
||||
let health_json: serde_json::Value = response.json();
|
||||
assert_eq!(health_json["ok"], true);
|
||||
@@ -19,7 +19,7 @@ async fn test_health_endpoint() {
|
||||
drop(container);
|
||||
|
||||
// Now verify health endpoint reports bad health
|
||||
let response = server.get("/health?force").await;
|
||||
let response = server.get("/api/health?force").await;
|
||||
assert_eq!(response.status_code(), 503); // SERVICE_UNAVAILABLE
|
||||
let health_json: serde_json::Value = response.json();
|
||||
assert_eq!(health_json["ok"], false);
|
||||
|
||||
Reference in New Issue
Block a user