Skip to content

Commit

Permalink
re-add & modify test for double-shash at the end of routes
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Dec 24, 2022
1 parent 9a59fd3 commit 5afcad1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,21 @@ mod test {
})
}

#[test]
fn double_slash_does_redirect_and_remove_slash() {
wrapper(|env| {
env.fake_release()
.name("bat")
.version("0.2.0")
.create()
.unwrap();
let web = env.frontend();
let response = web.get("/bat//").send()?;
assert_eq!(response.status(), StatusCode::NOT_FOUND);
Ok(())
})
}

#[test]
fn binary_docs_redirect_to_crate() {
wrapper(|env| {
Expand Down

0 comments on commit 5afcad1

Please sign in to comment.