MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_update_config

Function test_update_config

crates/opencode-config/src/loader.rs:1661–1674  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1659
1660 #[test]
1661 fn test_update_config() {
1662 let temp = TestDir::new("opencode_update_config");
1663
1664 let patch = Config {
1665 model: Some("claude-3-opus".to_string()),
1666 ..Default::default()
1667 };
1668
1669 update_config(&temp.path, &patch).unwrap();
1670
1671 let content = fs::read_to_string(temp.path.join("opencode.json")).unwrap();
1672 let config: Config = serde_json::from_str(&content).unwrap();
1673 assert_eq!(config.model, Some("claude-3-opus".to_string()));
1674 }
1675
1676 // ── YAML frontmatter parsing tests ──────────────────────────────
1677

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
update_configFunction · 0.85

Tested by

no test coverage detected