()
| 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() { |