There is currently no test that asserts the default value of cooldown_period_seconds is set correctly when it is not provided in the configuration. This could lead to regressions if the default value changes or is not set as expected.
Suggested Action Items:
- Add a test to verify that the default value of
cooldown_period_seconds is set when the field is omitted from the config.
- Implement a Cucumber step, for example:
#[then(regex = r#"^cooldown_period_seconds is (\d+)$"#)]
fn cooldown_period_seconds_is(world: &mut ConfigWorld, expected: u64) {
match world.result.take() {
Some(Ok(cfg)) => assert_eq!(cfg.cooldown_period_seconds, expected),
other => panic!("expected success, got {other:?}"),
}
}
- Add a scenario to the Cucumber feature file that loads a config without specifying
cooldown_period_seconds and then uses the step:
Then cooldown_period_seconds is <DEFAULT_VALUE>
Replace <DEFAULT_VALUE> with the actual default value from your config implementation.
This will ensure the default behavior is covered by tests and prevent future regressions.
Issue: #9
I created this issue for @leynos from #4 (comment).
Tips and commands
Getting Help
There is currently no test that asserts the default value of
cooldown_period_secondsis set correctly when it is not provided in the configuration. This could lead to regressions if the default value changes or is not set as expected.Suggested Action Items:
cooldown_period_secondsis set when the field is omitted from the config.cooldown_period_secondsand then uses the step:<DEFAULT_VALUE>with the actual default value from your config implementation.This will ensure the default behavior is covered by tests and prevent future regressions.
Issue: #9
I created this issue for @leynos from #4 (comment).
Tips and commands
Getting Help