tests: remove hidden couplings
This commit is contained in:
parent
ebd7755731
commit
fe5a596265
3 changed files with 27 additions and 35 deletions
|
|
@ -1,17 +1,12 @@
|
|||
use crate::helpers::{spawn_app, TestApp};
|
||||
use crate::helpers::spawn_app;
|
||||
|
||||
#[tokio::test]
|
||||
async fn health_check_works() {
|
||||
// Arrange
|
||||
let TestApp { address, .. } = spawn_app().await;
|
||||
let app = spawn_app().await;
|
||||
|
||||
// Act
|
||||
let client = reqwest::Client::new();
|
||||
let response = client
|
||||
.get(format!("{address}/health_check"))
|
||||
.send()
|
||||
.await
|
||||
.expect("Failed to execute request.");
|
||||
let response = app.get_health_check().await;
|
||||
|
||||
// Assert
|
||||
assert!(response.status().is_success());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue