add test_compare_blob_lists_deleted

This commit is contained in:
Rostyslav Tyshko 2025-04-03 18:37:05 -04:00
parent 2aec310c1e
commit 6b302a051f

View File

@ -162,5 +162,15 @@ mod tests {
assert!(matches!(changes[0], DataBlobChangeVariant::Created { .. }));
}
#[test]
fn test_compare_blob_lists_deleted() {
let old_list: Vec<DataBlob> = vec![[1; SC_DATA_BLOB_SIZE]];
let new_list: Vec<DataBlob> = vec![];
let changes = compare_blob_lists(&old_list, &new_list);
assert_eq!(changes.len(), 1);
assert!(matches!(changes[0], DataBlobChangeVariant::Deleted { .. }));
}
}