From 74c380300ac16ffa9084c731207877a8217cf827 Mon Sep 17 00:00:00 2001 From: Issac Kelly Date: Wed, 30 Nov 2022 19:00:03 -0800 Subject: [PATCH] Apply Alex's patch --- autosurgeon/src/reconcile.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autosurgeon/src/reconcile.rs b/autosurgeon/src/reconcile.rs index 7c55f07..ed3508d 100644 --- a/autosurgeon/src/reconcile.rs +++ b/autosurgeon/src/reconcile.rs @@ -1242,14 +1242,16 @@ mod tests { .transact_with::<_, _, automerge::AutomergeError, _>( |_| automerge::transaction::CommitOptions::default().with_message("Set Contact Book".to_owned()), |tx| { - - reconcile_prop(tx, automerge::ROOT, "contacts", alice).unwrap(); + use automerge::{Value, ObjType}; + let Ok(Some((Value::Object(ObjType::List), id))) = tx.get(&automerge::ROOT, "contacts") else { + panic!("unable to get contacts object ID"); + }; + reconcile_prop(tx, id, 1_usize, alice).unwrap(); Ok(()) }); let changes = doc.get_changes(&[]).unwrap(); assert_eq!(changes.len(), 2); - assert_doc!( &doc, {map! {