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

Function test_remote_config_set_default

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

Source from the content-addressed store, hash-verified

868
869 #[test]
870 fn test_remote_config_set_default() {
871 let mut config = RemoteConfig::new();
872 config
873 .add("origin", RemoteEntry::new("https://origin.com/repo"))
874 .unwrap();
875 config
876 .add("upstream", RemoteEntry::new("https://upstream.com/repo"))
877 .unwrap();
878
879 config.set_default("upstream").unwrap();
880
881 assert!(!config.get("origin").unwrap().default);
882 assert!(config.get("upstream").unwrap().default);
883 }
884
885 #[test]
886 fn test_remote_config_get_default_explicit() {

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
addMethod · 0.45
set_defaultMethod · 0.45

Tested by

no test coverage detected