diff --git a/examples/testing/src/main.rs b/examples/testing/src/main.rs index c2930e32..885316ce 100644 --- a/examples/testing/src/main.rs +++ b/examples/testing/src/main.rs @@ -16,6 +16,7 @@ fn main() { mod test { use super::rocket; use rocket::testing::MockRequest; + use rocket::http::Status; use rocket::http::Method::*; #[test] @@ -23,6 +24,7 @@ mod test { let rocket = rocket::ignite().mount("/", routes![super::hello]); let mut req = MockRequest::new(Get, "/"); let mut response = req.dispatch_with(&rocket); + assert_eq!(response.status(), Status::Ok); let body_string = response.body().and_then(|b| b.into_string()); assert_eq!(body_string, Some("Hello, world!".to_string()));