MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_server_config_default_org_base_url

Function test_server_config_default_org_base_url

atomic-config/src/lib.rs:1638–1662  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1636
1637 #[test]
1638 fn test_server_config_default_org_base_url() {
1639 let config = ServerConfig {
1640 url: Some("https://atomic.storage".to_string()),
1641 default_org: Some("alice".to_string()),
1642 default_workspaces: BTreeMap::new(),
1643 identity: None,
1644 agent_identity: None,
1645 single_tenant: false,
1646 };
1647 assert_eq!(
1648 config.default_org_base_url(),
1649 Some("https://alice.atomic.storage".to_string())
1650 );
1651
1652 // No default org → None
1653 let config = ServerConfig {
1654 url: Some("https://atomic.storage".to_string()),
1655 default_org: None,
1656 default_workspaces: BTreeMap::new(),
1657 identity: None,
1658 agent_identity: None,
1659 single_tenant: false,
1660 };
1661 assert!(config.default_org_base_url().is_none());
1662 }
1663
1664 #[test]
1665 fn test_server_config_serialization_roundtrip() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected