diff --git a/tests/api/subscriptions.rs b/tests/api/subscriptions.rs index 6176cfa..22270f4 100644 --- a/tests/api/subscriptions.rs +++ b/tests/api/subscriptions.rs @@ -71,7 +71,7 @@ async fn subscribe_returns_a_400_when_fields_are_present_but_empty() { // then assert_eq!( 400, - response.status().as_u16(), + response.status(), "The API did not return a 400 BAD_REQUEST when the payload was {}", description ); @@ -126,7 +126,7 @@ async fn subscribe_sends_a_confirmation_email_on_repeated_calls() { // then assert_eq!( - response.status().as_u16(), + response.status(), 200, "The API did not reurn a 200 OK for call number {}", i @@ -238,7 +238,7 @@ async fn subscribe_returns_a_422_when_email_is_already_confirmed() { // then assert_eq!( - response.status().as_u16(), + response.status(), 422, "The API did not return a 422 Unprocessable Entity", ); diff --git a/tests/api/subscriptions_confirm.rs b/tests/api/subscriptions_confirm.rs index a6430cb..d38a383 100644 --- a/tests/api/subscriptions_confirm.rs +++ b/tests/api/subscriptions_confirm.rs @@ -14,7 +14,7 @@ async fn confirmations_without_token_are_rejected_with_a_400() { let response = app.confirm_subscription().await; // then - assert_eq!(response.status().as_u16(), 400); + assert_eq!(response.status(), 400); } #[tokio::test] @@ -38,7 +38,7 @@ async fn the_link_returned_by_subscribe_returns_200_if_called() { let response = reqwest::get(links.html).await.unwrap(); // then - assert_eq!(response.status().as_u16(), 200); + assert_eq!(response.status(), 200); } #[tokio::test] @@ -96,7 +96,7 @@ async fn subsequent_clicks_on_the_confirmation_link_are_rejected_with_a_401() { let response = reqwest::get(links.html).await.unwrap(); // then - assert_eq!(response.status().as_u16(), 401); + assert_eq!(response.status(), 401); } #[tokio::test]