diff --git a/src/httprequest.rs b/src/httprequest.rs index 07ae8b4e..f4b052a7 100644 --- a/src/httprequest.rs +++ b/src/httprequest.rs @@ -550,6 +550,9 @@ mod tests { let mut req = req.with_state(Rc::new(()), router); + assert_eq!(req.router().unwrap().has_route("index")); + assert_eq!(!req.router().unwrap().has_route("unknown")); + assert_eq!(req.url_for("unknown", &["test"]), Err(UrlGenerationError::ResourceNotFound)); assert_eq!(req.url_for("index", &["test"]),