diff --git a/tests/health_check.rs b/tests/health_check.rs index b3f1bd0..b72efb1 100644 --- a/tests/health_check.rs +++ b/tests/health_check.rs @@ -143,7 +143,7 @@ async fn subscribe_returns_a_400_when_data_is_missing() { } #[actix_rt::test] -async fn subscribe_returns_a_200_when_fields_are_present_but_empty() { +async fn subscribe_returns_a_400_when_fields_are_present_but_invalid() { // Arrange let app = spawn_app().await; let client = reqwest::Client::new(); @@ -165,9 +165,9 @@ async fn subscribe_returns_a_200_when_fields_are_present_but_empty() { // Assert assert_eq!( - 200, + 400, response.status().as_u16(), - "The API did not return a 200 OK when the payload was {}.", + "The API did not return a 400 Bad Request when the payload was {}.", description ); }