mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-18 16:24:38 +00:00
craft-esign make the outstanding-send regression test actually outstanding
The send helper submitted the create immediately, consuming the captured context before the status request ran. The test now queues and takes document A's send without submitting it, leaving the context pending. That pending context is the scenario the guard exists for.
This commit is contained in:
1 parent
52d874ae96
commit
a64ad59593
1 file changed
+6
-2
@@ -81,9 +81,13 @@ fn status_for_the_current_document_is_not_consumed_by_an_outstanding_send_from_a
|
||||
let (mut dialog, hold) = ready();
|
||||
|
||||
// Document A's send is taken by the app but never submitted: its captured
|
||||
// context stays pending.
|
||||
// context stays pending. The `send` helper would submit the create and
|
||||
// consume that context, which is exactly what this test must avoid.
|
||||
dialog.open("doc-A".into(), "A.pdf".into(), None, who("alice"));
|
||||
send(&mut dialog, b"A bytes");
|
||||
dialog.add_email("bob@example.com".into());
|
||||
dialog.queue_send();
|
||||
let taken = dialog.take_send_request();
|
||||
assert!(taken.is_some(), "A's send request was taken, leaving its context pending");
|
||||
|
||||
// The dialog moves on to document B, which already has an envelope the
|
||||
// host wants a status for.
|
||||
|
||||
Reference in new issue
Block a user