Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jul 2, 2024
1 parent 3121f27 commit d1dc8dd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions poem/src/endpoint/prometheus_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,20 @@ impl Endpoint for PrometheusExporterEndpoint {
}
}
}

#[cfg(test)]
mod tests {
use crate::test::TestClient;

use super::*;

#[tokio::test]
async fn test_content_type() {
let client = TestClient::new(PrometheusExporter::new(Registry::new()));

let resp = client.get("/metrics").send().await;

resp.assert_status_is_ok();
resp.assert_content_type("text/plain; version=0.0.4");
}
}

0 comments on commit d1dc8dd

Please sign in to comment.