| 1 |
use crate::harness::TestHarness; |
| 2 |
|
| 3 |
#[tokio::test] |
| 4 |
async fn health_endpoint_returns_operational_with_db() { |
| 5 |
let mut h = TestHarness::new().await; |
| 6 |
let resp = h.client.get("/api/health").await; |
| 7 |
assert_eq!(resp.status, 200); |
| 8 |
let body: serde_json::Value = resp.json(); |
| 9 |
assert_eq!(body["status"], "operational"); |
| 10 |
assert_eq!(body["database"], true); |
| 11 |
assert!(body["version"].as_str().is_some()); |
| 12 |
} |
| 13 |
|