()
| 932 | |
| 933 | #[test] |
| 934 | fn test_remote_config_rename() { |
| 935 | let mut config = RemoteConfig::new(); |
| 936 | config |
| 937 | .add("origin", RemoteEntry::new("https://example.com/repo")) |
| 938 | .unwrap(); |
| 939 | |
| 940 | config.rename("origin", "upstream").unwrap(); |
| 941 | |
| 942 | assert!(!config.contains("origin")); |
| 943 | assert!(config.contains("upstream")); |
| 944 | assert_eq!( |
| 945 | config.get("upstream").unwrap().url, |
| 946 | "https://example.com/repo" |
| 947 | ); |
| 948 | } |
| 949 | |
| 950 | #[test] |
| 951 | fn test_remote_config_rename_nonexistent() { |