18 lines
442 B
Rust
18 lines
442 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());
|
|
}
|