Initial commit: Book management system with Rust Loco backend and Vue 3 frontend

This commit is contained in:
2026-04-30 00:26:47 +08:00
commit 1f22546766
11332 changed files with 1076475 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
use book_manager::app::App;
use loco_rs::testing::prelude::*;
use serial_test::serial;
#[tokio::test]
#[serial]
async fn test_books_route_exists() {
request::<App, _, _>(|request, _ctx| async move {
// Try to access books test endpoint
let response = request.get("/api/books/test").await;
println!("Status: {}", response.status_code());
println!("Body: {}", response.text());
// Check if we get JSON response
assert_eq!(response.status_code(), 200);
let body = response.text();
assert!(body.contains("Books controller is working"), "Got: {}", body);
})
.await;
}