feat: add mock implementations for configuration settings and update AppState to include config
This commit is contained in:
@@ -50,4 +50,13 @@ impl FromConfig for DatabaseSettings {
|
||||
fn validate(&self) -> Result<(), String> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn mock() -> Self {
|
||||
DatabaseSettings {
|
||||
url: "sqlite::memory:".to_string(),
|
||||
max_connections: 5,
|
||||
migrate_on_startup: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user