Skip to content

Commit eaf25ea

Browse files
committed
add trailing slash removal tests
1 parent ba4857f commit eaf25ea

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/remove.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,23 @@ fn overlapping_routes() {
209209
.run();
210210
}
211211

212+
#[test]
213+
fn trailing_slash() {
214+
RemoveTest {
215+
routes: vec!["/{home}/", "/foo"],
216+
ops: vec![
217+
(Remove, "/", None),
218+
(Remove, "/{home}", None),
219+
(Remove, "/foo/", None),
220+
(Remove, "/foo", Some("/foo")),
221+
(Remove, "/{home}", None),
222+
(Remove, "/{home}/", Some("/{home}/")),
223+
],
224+
remaining: vec![],
225+
}
226+
.run();
227+
}
228+
212229
#[test]
213230
fn remove_root() {
214231
RemoveTest {

0 commit comments

Comments
 (0)