Skip to content

Commit 74c3803

Browse files
committed
Apply Alex's patch
1 parent 2489f26 commit 74c3803

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

autosurgeon/src/reconcile.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,14 +1242,16 @@ mod tests {
12421242
.transact_with::<_, _, automerge::AutomergeError, _>(
12431243
|_| automerge::transaction::CommitOptions::default().with_message("Set Contact Book".to_owned()),
12441244
|tx| {
1245-
1246-
reconcile_prop(tx, automerge::ROOT, "contacts", alice).unwrap();
1245+
use automerge::{Value, ObjType};
1246+
let Ok(Some((Value::Object(ObjType::List), id))) = tx.get(&automerge::ROOT, "contacts") else {
1247+
panic!("unable to get contacts object ID");
1248+
};
1249+
reconcile_prop(tx, id, 1_usize, alice).unwrap();
12471250
Ok(())
12481251
});
12491252
let changes = doc.get_changes(&[]).unwrap();
12501253
assert_eq!(changes.len(), 2);
12511254

1252-
12531255
assert_doc!(
12541256
&doc,
12551257
{map! {

0 commit comments

Comments
 (0)