Files
zero2prod/tests/api/health_check.rs
Alphonse Paix e5799f2cd8 update test
2025-09-28 16:50:34 +02:00

23 lines
492 B
Rust

use crate::helpers::TestApp;
use sqlx::PgPool;
#[sqlx::test]
async fn health_check_works(connection_pool: PgPool) {
let app = TestApp::spawn(connection_pool).await;
let client = reqwest::Client::new();
let response = client
.get(format!("{}/health_check", app.address))
.send()
.await
.unwrap();
assert!(response.status().is_success());
assert_eq!(Some(0), response.content_length());
}
#[test]
fn it_works() {
// it really does!
}