Sync tests build a server note from wire::sample_note

pull's note() and push's server_note each wrote out all nineteen fields of a
wire::Note. wire::sample_note(id, revision) is that note; push's version changes
only the body and attachments, by struct update.

DRY pass #2, batch 2, F9 (#5372).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 14:25:14 -04:00
co-authored by Claude Opus 5.5
parent 2dec89bf8c
commit 2809c26214
3 changed files with 29 additions and 38 deletions
+1 -21
View File
@@ -513,27 +513,7 @@ mod tests {
}
fn note(id: &str, revision: i64) -> wire::Note {
wire::Note {
id: id.to_string(),
body: "Body".into(),
position: 0,
pinned: false,
archived: false,
trashed: false,
deleted_at: None,
remind_at: None,
recurrence: None,
created_at: Some("2026-07-26T00:00:00.000Z".into()),
updated_at: Some("2026-07-26T00:00:00.000Z".into()),
sync_revision: revision,
purged_at: None,
labels: vec![],
attachments: vec![],
previews: vec![],
permission: None,
shared: false,
shared_by: None,
}
wire::sample_note(id, revision)
}
fn attachment(id: &str) -> wire::Attachment {