rust_app/tests/test_hello.rs
continuist da406d4943
Some checks failed
Pipeline main branch / test (push) Failing after 30s
First commit
2025-04-13 00:08:55 -04:00

18 lines
No EOL
521 B
Rust

#[tokio::test]
async fn test_hello_route() {
use axum_test::TestServer;
use server::server::create_app;
// Create a TestServer with your application
let app = create_app().await;
let server = TestServer::new(app).unwrap();
// Make a request to the `/hello` route
let response = server.get("/").await;
// Assert that the status code is OK (200)
response.assert_status_ok();
// Assert that the response body contains the expected text
response.assert_text("Hello, World!");
}