Refactor the integration test suite

This commit is contained in:
2022-02-19 14:00:07 +01:00
parent 289c3959da
commit 294e1a867d
4 changed files with 5 additions and 10 deletions

15
tests/api/health_check.rs Normal file
View File

@@ -0,0 +1,15 @@
use crate::helpers::app_address;
use rstest::*;
#[rstest]
#[tokio::test]
async fn health_check_works(app_address: &str) {
let response = reqwest::Client::new()
.get(&format!("{}/ping", &app_address))
.send()
.await
.expect("Failed to execute request.");
assert!(response.status().is_success());
assert_eq!(Some(0), response.content_length());
}