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:
Ryan Walters
2025-11-02 19:51:52 -06:00
parent 45e6131121
commit 8f8f82630f
4 changed files with 16 additions and 16 deletions

View File

@@ -40,16 +40,16 @@ async fn test_session_management() {
// 3. Make a request to the protected route WITH the session, expect success
let response = context
.server
.get("/profile")
.get("/api/profile")
.add_cookie(Cookie::new(session::SESSION_COOKIE_NAME, token))
.await;
assert_eq!(response.status_code(), 200);
// 4. Sign out
let response = context.server.get("/logout").await;
let response = context.server.get("/api/logout").await;
assert_eq!(response.status_code(), 302); // Redirect after logout
// 5. Make a request to the protected route without a session, expect failure
let response = context.server.get("/profile").await;
let response = context.server.get("/api/profile").await;
assert_eq!(response.status_code(), 401); // Unauthorized without session
}