From 36bf70467385439d6df620698abad1d707164286 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Thu, 12 Jan 2017 02:47:25 -0800 Subject: [PATCH] Fix config example tests for new Config structure. --- examples/config/tests/common/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/config/tests/common/mod.rs b/examples/config/tests/common/mod.rs index 3a248414..7517593d 100644 --- a/examples/config/tests/common/mod.rs +++ b/examples/config/tests/common/mod.rs @@ -18,8 +18,9 @@ pub fn test_config(environment: Environment) { Environment::Development => { assert_eq!(config.address, "localhost".to_string()); assert_eq!(config.port, 8000); + assert_eq!(config.workers, 1); assert_eq!(config.log_level, LoggingLevel::Normal); - assert_eq!(config.env, config::Environment::Development); + assert_eq!(config.environment, config::Environment::Development); assert_eq!(config.extras().count(), 2); assert_eq!(config.get_str("hi"), Ok("Hello!")); assert_eq!(config.get_bool("is_extra"), Ok(true)); @@ -27,15 +28,17 @@ pub fn test_config(environment: Environment) { Environment::Staging => { assert_eq!(config.address, "0.0.0.0".to_string()); assert_eq!(config.port, 80); + assert_eq!(config.workers, 8); assert_eq!(config.log_level, LoggingLevel::Normal); - assert_eq!(config.env, config::Environment::Staging); + assert_eq!(config.environment, config::Environment::Staging); assert_eq!(config.extras().count(), 0); } Environment::Production => { assert_eq!(config.address, "0.0.0.0".to_string()); assert_eq!(config.port, 80); + assert_eq!(config.workers, 12); assert_eq!(config.log_level, LoggingLevel::Critical); - assert_eq!(config.env, config::Environment::Production); + assert_eq!(config.environment, config::Environment::Production); assert_eq!(config.extras().count(), 0); } }