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

Function test_remote_config_add_invalid_name

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

Source from the content-addressed store, hash-verified

797
798 #[test]
799 fn test_remote_config_add_invalid_name() {
800 let mut config = RemoteConfig::new();
801
802 assert!(matches!(
803 config.add("", RemoteEntry::new("https://example.com/repo")),
804 Err(RemoteError::InvalidName { .. })
805 ));
806
807 assert!(matches!(
808 config.add("-origin", RemoteEntry::new("https://example.com/repo")),
809 Err(RemoteError::InvalidName { .. })
810 ));
811
812 assert!(matches!(
813 config.add("ori gin", RemoteEntry::new("https://example.com/repo")),
814 Err(RemoteError::InvalidName { .. })
815 ));
816 }
817
818 #[test]
819 fn test_remote_config_add_invalid_url() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected