Skip to content

Commit

Permalink
This commit was suggested by you (Alex) but still failing in about th…
Browse files Browse the repository at this point in the history
…e same way, truncating bob out of the contactslist
  • Loading branch information
issackelly committed Dec 1, 2022
1 parent 2489f26 commit ec97a77
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions autosurgeon/src/reconcile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1242,14 +1242,15 @@ 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();
Ok(())
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();
});
let changes = doc.get_changes(&[]).unwrap();
assert_eq!(changes.len(), 2);


assert_doc!(
&doc,
{map! {
Expand Down

0 comments on commit ec97a77

Please sign in to comment.