feat: add mock implementations for configuration settings and update AppState to include config
This commit is contained in:
@@ -48,4 +48,13 @@ impl FromConfig for AuthSettings {
|
||||
fn validate(&self) -> Result<(), String> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn mock() -> Self {
|
||||
AuthSettings {
|
||||
jwt_secret: Some("mock_jwt_secret".to_string()),
|
||||
default_admin_username: Some("admin".to_string()),
|
||||
default_admin_password: Some("password".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user