diff --git a/ntex/src/web/config.rs b/ntex/src/web/config.rs index 0f7ef423..04ca90c7 100644 --- a/ntex/src/web/config.rs +++ b/ntex/src/web/config.rs @@ -152,7 +152,7 @@ mod tests { use crate::http::{Method, StatusCode}; use crate::util::Bytes; use crate::web::test::{call_service, init_service, read_body, TestRequest}; - use crate::web::{self, App, HttpRequest, HttpResponse}; + use crate::web::{self, App, DefaultError, HttpRequest, HttpResponse}; #[crate::rt_test] async fn test_configure_state() { @@ -225,4 +225,11 @@ mod tests { let resp = call_service(&srv, req).await; assert_eq!(resp.status(), StatusCode::OK); } + + #[test] + fn test_service_config_register() { + let cfg: ServiceConfig = ServiceConfig::register(); + assert!(cfg.services.is_empty()); + assert!(cfg.external.is_empty()); + } }