zero2prod_axum/tests/api/health_check.rs

15 lines
302 B
Rust
Raw Permalink Normal View History

2024-03-04 11:48:47 +01:00
use crate::helpers::spawn_app;
#[tokio::test]
async fn health_check_works() {
// Arrange
2024-03-04 11:48:47 +01:00
let app = spawn_app().await;
// Act
2024-03-04 11:48:47 +01:00
let response = app.get_health_check().await;
// Assert
assert!(response.status().is_success());
assert_eq!(Some(0), response.content_length());
}