craft-esign apply rustfmt to the new tests

Wraps a few lines fmt would otherwise reject on the next check.
This commit is contained in:
William Dunn committed 2026-11-17 21:03:40 -05:00
1 parent 820aa7b32c
commit 5c44349a89
2 files changed
+16 -9

No files matched your search

+6 -1
View File
@@ -45,7 +45,12 @@ fn create_reply_for_a_request_taken_before_reopening_does_not_install_in_the_new
// The dialog moves on before the application gets around to submitting
// what it already took.
dialog.open("doc-B".into(), "B.pdf".into(), None, who("alice"));
dialog.submit_request(Request::Create { draft: Box::new(out.draft), document: b"A bytes".to_vec(), idempotency_key: out.idempotency_key, send: true });
dialog.submit_request(Request::Create {
draft: Box::new(out.draft),
document: b"A bytes".to_vec(),
idempotency_key: out.idempotency_key,
send: true,
});
let (_, create) = hold.take(|r| matches!(r, Request::Create { .. }));
create.answer(Answer::Created(envelope_for("doc-A", "alice")));
+10 -8
View File
@@ -836,12 +836,8 @@ mod tests {
#[test]
fn compose_form_shows_sign_in_message_when_not_linked() {
let mut dialog = EsignDialog {
capabilities: Some(vec![EsignCapability::Envelopes]),
document_title: "A.pdf".into(),
linked: false,
..Default::default()
};
let mut dialog =
EsignDialog { capabilities: Some(vec![EsignCapability::Envelopes]), document_title: "A.pdf".into(), linked: false, ..Default::default() };
let ctx = Context::default();
let mut full = ctx.run_ui(egui::RawInput::default(), |ui| dialog.ui(ui));
full.textures_delta.clear();
@@ -860,8 +856,14 @@ mod tests {
#[test]
fn add_contact_rejects_a_contact_with_no_email() {
let mut dialog = EsignDialog::default();
let contact =
Contact { id: "share-id-123".into(), target: craft_cloud::ShareTarget::User("share-id-123".into()), name: "Mallory".into(), email: None, avatar: None, is_group: false };
let contact = Contact {
id: "share-id-123".into(),
target: craft_cloud::ShareTarget::User("share-id-123".into()),
name: "Mallory".into(),
email: None,
avatar: None,
is_group: false,
};
dialog.add_contact(contact);
assert!(dialog.recipients.is_empty(), "a contact with no email became a recipient: {:?}", dialog.recipients);
assert_eq!(dialog.error.as_deref(), Some(dialog.labels.contact_missing_email.as_str()));