-
Notifications
You must be signed in to change notification settings - Fork 2
test(init): add build_config test for postgres backend path #2378
Copy link
Copy link
Closed
Labels
P2High value, medium complexityHigh value, medium complexitytestingTests and qualityTests and quality
Description
Context
src/init.rs build_config() gained a postgres branch in Phase 3: when state.database_url is Some(_), it skips the sqlite_path prompt and sets MemoryConfig::database_url. This path has no build_config unit test.
Acceptance Criteria
- Test that when
WizardState { database_url: Some("".to_owned()), .. }is passed tobuild_config(), the resultingConfig::memory.database_urlisSome(_) - Test that
sqlite_pathfalls back to the serde default (not an empty string) in that case - Test that when
database_urlisNone, the existing sqlite path behavior is unchanged
Notes
WizardState derives Clone under #[cfg_attr(test, derive(Clone))] and has Default impl — test setup is straightforward.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2High value, medium complexityHigh value, medium complexitytestingTests and qualityTests and quality