1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-08-02 18:55:05 +00:00

test for Router::has_route

This commit is contained in:
Nikolay Kim 2017-12-06 16:40:23 -08:00
parent a18bd5dac0
commit 63502fa833

View file

@ -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"]),