Files
zero2prod/tests/api/health_check.rs
2025-08-25 17:46:03 +02:00

17 lines
387 B
Rust

use crate::helpers::TestApp;
#[tokio::test]
async fn health_check_works() {
let app = TestApp::spawn().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());
}