Store documents as Automerge state

This commit is contained in:
Eric Wendland 2026-05-22 14:54:00 +02:00
commit b01da7be4b
9 changed files with 490 additions and 73 deletions

View file

@ -2889,8 +2889,8 @@ fn document_create_and_status_use_local_store() {
match response {
geth_control::ControlResponse::DocumentCreated { document } => {
assert_eq!(document.name, "notes");
assert_eq!(document.sync_status, "local-only");
assert_eq!(document.state_bytes, 2);
assert_eq!(document.sync_status, "automerge-local");
assert!(document.state_bytes > 2);
}
other => panic!("unexpected response: {other:?}"),
}
@ -2906,7 +2906,7 @@ fn document_create_and_status_use_local_store() {
geth_control::ControlResponse::DocumentStatus { document } => {
assert_eq!(document.id.to_string(), "document:notes");
assert_eq!(document.resource.to_string(), "resource:document:notes");
assert_eq!(document.state_bytes, 2);
assert!(document.state_bytes > 2);
}
other => panic!("unexpected response: {other:?}"),
}