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

Function test_remote_config_rename

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
addMethod · 0.45
renameMethod · 0.45

Tested by

no test coverage detected