()
| 786 | |
| 787 | #[test] |
| 788 | fn test_remote_config_add_duplicate() { |
| 789 | let mut config = RemoteConfig::new(); |
| 790 | config |
| 791 | .add("origin", RemoteEntry::new("https://example.com/repo")) |
| 792 | .unwrap(); |
| 793 | |
| 794 | let result = config.add("origin", RemoteEntry::new("https://other.com/repo")); |
| 795 | assert!(matches!(result, Err(RemoteError::AlreadyExists { .. }))); |
| 796 | } |
| 797 | |
| 798 | #[test] |
| 799 | fn test_remote_config_add_invalid_name() { |