diff --git a/examples/hello/src/tests.rs b/examples/hello/src/tests.rs index bb66dc87c5..8f0b191ce6 100644 --- a/examples/hello/src/tests.rs +++ b/examples/hello/src/tests.rs @@ -31,7 +31,7 @@ fn hello() { let uri = format!("/?{}{}{}", q("lang", lang), q("emoji", emoji), q("name", name)); let response = client.get(uri).dispatch(); assert!( - response.routed_by::(), + response.was_routed_by::(), "Response was not generated by the `hello` route" ); assert_eq!(response.into_string().unwrap(), expected); @@ -39,7 +39,7 @@ fn hello() { let uri = format!("/?{}{}{}", q("emoji", emoji), q("name", name), q("lang", lang)); let response = client.get(uri).dispatch(); assert!( - response.routed_by::(), + response.was_routed_by::(), "Response was not generated by the `hello` route" ); assert_eq!(response.into_string().unwrap(), expected); @@ -51,7 +51,7 @@ fn hello_world() { let client = Client::tracked(super::rocket()).unwrap(); let response = client.get("/hello/world").dispatch(); assert!( - response.routed_by::(), + response.was_routed_by::(), "Response was not generated by the `world` route" ); assert_eq!(response.into_string(), Some("Hello, world!".into())); @@ -61,7 +61,10 @@ fn hello_world() { fn hello_mir() { let client = Client::tracked(super::rocket()).unwrap(); let response = client.get("/hello/%D0%BC%D0%B8%D1%80").dispatch(); - assert!(response.routed_by::(), "Response was not generated by the `mir` route"); + assert!( + response.was_routed_by::(), + "Response was not generated by the `mir` route" + ); assert_eq!(response.into_string(), Some("Привет, мир!".into())); } @@ -74,7 +77,7 @@ fn wave() { let expected = format!("👋 Hello, {} year old named {}!", age, real_name); let response = client.get(uri).dispatch(); assert!( - response.routed_by::(), + response.was_routed_by::(), "Response was not generated by the `wave` route" ); assert_eq!(response.into_string().unwrap(), expected); @@ -83,7 +86,7 @@ fn wave() { let bad_uri = format!("/wave/{}/{}", name, bad_age); let response = client.get(bad_uri).dispatch(); assert!( - response.caught_by::(), + response.was_caught_by::(), "Response was not generated by the default catcher" ); assert_eq!(response.status(), Status::NotFound);