From fe9e2256a343ac8608a3016b63cf991ec1e026c4 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sat, 6 Mar 2021 01:39:24 -0800 Subject: [PATCH] Update hello_world example test. --- examples/hello_world/src/tests.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/hello_world/src/tests.rs b/examples/hello_world/src/tests.rs index a4951f4d..39d67b58 100644 --- a/examples/hello_world/src/tests.rs +++ b/examples/hello_world/src/tests.rs @@ -5,4 +5,14 @@ fn hello_world() { let client = Client::tracked(super::rocket()).unwrap(); let response = client.get("/").dispatch(); assert_eq!(response.into_string(), Some("Hello, world!".into())); + + let response = client.get("/hello/world").dispatch(); + assert_eq!(response.into_string(), Some("Hello, world!".into())); +} + +#[test] +fn hello_mir() { + let client = Client::tracked(super::rocket()).unwrap(); + let response = client.get("/hello/%D0%BC%D0%B8%D1%80").dispatch(); + assert_eq!(response.into_string(), Some("Привет, мир!".into())); }