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

Function test_add_default_unmarks_existing

atomic-repository/src/remote.rs:1134–1152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1132
1133 #[test]
1134 fn test_add_default_unmarks_existing() {
1135 let mut config = RemoteConfig::new();
1136 config
1137 .add(
1138 "origin",
1139 RemoteEntry::new_default("https://origin.com/repo"),
1140 )
1141 .unwrap();
1142 config
1143 .add(
1144 "upstream",
1145 RemoteEntry::new_default("https://upstream.com/repo"),
1146 )
1147 .unwrap();
1148
1149 // Adding a new default should unmark the old one
1150 assert!(!config.get("origin").unwrap().default);
1151 assert!(config.get("upstream").unwrap().default);
1152 }
1153}

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected