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

Function test_insert_error_display

atomic-repository/src/apply/tests.rs:105–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103
104#[test]
105fn test_insert_error_display() {
106 let err = InsertError::ChangeNotFound {
107 hash: "ABC123".to_string(),
108 };
109 assert!(err.to_string().contains("ABC123"));
110
111 let hash1 = Hash::of(b"dep1");
112 let err = InsertError::MissingDependencies {
113 missing: vec![hash1],
114 };
115 let msg = err.to_string();
116 assert!(msg.contains("Missing dependencies"));
117
118 let err = InsertError::AlreadyApplied {
119 hash: "XYZ789".to_string(),
120 };
121 assert!(err.to_string().contains("already applied"));
122}
123
124#[test]
125fn test_insert_error_from_local() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected