Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(config): compare empty document against direct toml parse

Steven Enamakel556a74b88c4b
diff --git a/crates/openhuman-core/src/config/schema/load/parse_tests.rs b/crates/openhuman-core/src/config/schema/load/parse_tests.rs
index d44da94acc..6c416231c8 100644
--- a/crates/openhuman-core/src/config/schema/load/parse_tests.rs
+++ b/crates/openhuman-core/src/config/schema/load/parse_tests.rs
@@ -20,11 +20,12 @@ fn parses_the_same_config_as_direct_toml() {
}
#[test]
-fn an_empty_document_yields_defaults() {
- let parsed = config_from_toml_str("").expect("empty document parses");
+fn an_empty_document_matches_direct_toml() {
+ let via_value = config_from_toml_str("").expect("empty document parses");
+ let direct: Config = toml::from_str("").expect("empty document parses directly");
assert_eq!(
- serde_json::to_value(&parsed).unwrap(),
- serde_json::to_value(&Config::default()).unwrap()
+ serde_json::to_value(&via_value).unwrap(),
+ serde_json::to_value(&direct).unwrap()
);
}