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

Commit

Permalink
Add unhappy case scenario test
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianEffe committed Aug 15, 2023
1 parent 41102c8 commit d5193e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Tests/redirect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ async fn redirect_303_for_valid_redirection() {
let location = response.headers().get(LOCATION).unwrap().to_str().unwrap();
assert_eq!(url, location);
}

#[tokio::test]
async fn redirect_500_for_invalid_extension() {
let app = TestApp::new().await;

let response = app.get("-12-12-12").send().await.unwrap();
assert_eq!(500, response.status().as_u16());
}

0 comments on commit d5193e1

Please sign in to comment.