fix(health): move test to dedicated test mod
This commit is contained in:
+10
-7
@@ -28,11 +28,14 @@ impl HealthApi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[cfg(test)]
|
||||||
async fn health_check_works() {
|
mod tests {
|
||||||
let app = crate::get_test_app();
|
#[tokio::test]
|
||||||
let cli = poem::test::TestClient::new(app);
|
async fn health_check_works() {
|
||||||
let resp = cli.get("/api/health").send().await;
|
let app = crate::get_test_app();
|
||||||
resp.assert_status_is_ok();
|
let cli = poem::test::TestClient::new(app);
|
||||||
resp.assert_text("").await;
|
let resp = cli.get("/api/health").send().await;
|
||||||
|
resp.assert_status_is_ok();
|
||||||
|
resp.assert_text("").await;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user