diff --git a/src/application.rs b/src/application.rs index d8a6cbe7b..70027d21a 100644 --- a/src/application.rs +++ b/src/application.rs @@ -824,6 +824,16 @@ mod tests { assert_eq!(resp.as_msg().status(), StatusCode::NOT_FOUND); } + #[test] + fn test_unit_responser() { + let app = App::new().resource("/unit", |r| r.f(|_| {})).finish(); + + let req = TestRequest::with_uri("/unit").request(); + let resp = app.run(req); + assert_eq!(resp.as_msg().status(), StatusCode::OK); + assert_eq!(resp.as_msg().body(), &Body::Empty); + } + #[test] fn test_option_responder() { let app = App::new()