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

Function test_remote_config_iter

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

Source from the content-addressed store, hash-verified

970
971 #[test]
972 fn test_remote_config_iter() {
973 let mut config = RemoteConfig::new();
974 config
975 .add("a", RemoteEntry::new("https://a.com/repo"))
976 .unwrap();
977 config
978 .add("b", RemoteEntry::new("https://b.com/repo"))
979 .unwrap();
980
981 let names: Vec<&str> = config.iter().map(|(n, _)| n).collect();
982 assert_eq!(names.len(), 2);
983 assert!(names.contains(&"a"));
984 assert!(names.contains(&"b"));
985 }
986
987 #[test]
988 fn test_remote_config_names() {

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
addMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected