From 5c8e3fa35df9cee4a5cfe64bc8448cf3a54b050c Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Mon, 22 Mar 2021 13:34:26 +0100 Subject: [PATCH] Add badge test --- tests/badge.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/badge.rs diff --git a/tests/badge.rs b/tests/badge.rs new file mode 100644 index 0000000..571a647 --- /dev/null +++ b/tests/badge.rs @@ -0,0 +1,18 @@ +mod util; + +use actix_web::client; + +#[actix_rt::test] +async fn badge_succeeds() { + let test_app = util::spawn_app().await; + + let client = client::Client::default(); + + let response = client + .get(&format!("{}/github/vbrandl/hoc", test_app.address)) + .send() + .await + .expect("Failed to execute request"); + + assert!(response.status().is_success()); +}