Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Remove unnecessary type conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
0rzech committed Mar 11, 2024
1 parent 2917615 commit b5a6862
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/api/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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",
);
Expand Down
6 changes: 3 additions & 3 deletions tests/api/subscriptions_confirm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit b5a6862

Please sign in to comment.