Skip to content

Commit

Permalink
Just a bit of sanity check for short paths (actix#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh authored Jul 20, 2018
1 parent 0925a76 commit f6e35a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/httprequest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ mod tests {
router.register_resource(resource);

let info = router.default_route_info();
assert!(!info.has_prefixed_resource("/use/"));
assert!(info.has_resource("/user/test.html"));
assert!(info.has_prefixed_resource("/user/test.html"));
assert!(!info.has_resource("/test/unknown"));
Expand Down Expand Up @@ -468,6 +469,7 @@ mod tests {

let mut info = router.default_route_info();
info.set_prefix(7);
assert!(!info.has_prefixed_resource("/use/"));
assert!(info.has_resource("/user/test.html"));
assert!(!info.has_prefixed_resource("/user/test.html"));
assert!(!info.has_resource("/prefix/user/test.html"));
Expand Down

0 comments on commit f6e35a0

Please sign in to comment.