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

Function test_remote_error_display

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

Source from the content-addressed store, hash-verified

1110
1111 #[test]
1112 fn test_remote_error_display() {
1113 let err = RemoteError::AlreadyExists {
1114 name: "origin".to_string(),
1115 };
1116 assert!(err.to_string().contains("origin"));
1117 assert!(err.to_string().contains("already exists"));
1118
1119 let err = RemoteError::NotFound {
1120 name: "origin".to_string(),
1121 };
1122 assert!(err.to_string().contains("origin"));
1123 assert!(err.to_string().contains("not found"));
1124
1125 let err = RemoteError::InvalidName {
1126 name: "bad name".to_string(),
1127 reason: "contains space".to_string(),
1128 };
1129 assert!(err.to_string().contains("bad name"));
1130 assert!(err.to_string().contains("contains space"));
1131 }
1132
1133 #[test]
1134 fn test_add_default_unmarks_existing() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected