Skip to content

Commit

Permalink
add trailing slash removal tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheemdev committed Apr 28, 2024
1 parent ba4857f commit eaf25ea
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,23 @@ fn overlapping_routes() {
.run();
}

#[test]
fn trailing_slash() {
RemoveTest {
routes: vec!["/{home}/", "/foo"],
ops: vec![
(Remove, "/", None),
(Remove, "/{home}", None),
(Remove, "/foo/", None),
(Remove, "/foo", Some("/foo")),
(Remove, "/{home}", None),
(Remove, "/{home}/", Some("/{home}/")),
],
remaining: vec![],
}
.run();
}

#[test]
fn remove_root() {
RemoveTest {
Expand Down

0 comments on commit eaf25ea

Please sign in to comment.