test_utils: set message state to OutDelivered on .pop_sent_msg()

Also remove SentMessage.id. It was set to foreign_id of the job, which
is a MsgId, not ChatId, so tests using it were not correct anyway.
This commit is contained in:
Alexander Krotov
2020-12-05 21:31:53 +03:00
committed by link2xt
parent 93e038e056
commit 00a223b574
2 changed files with 5 additions and 15 deletions

View File

@@ -1117,10 +1117,9 @@ mod tests {
.unwrap();
// Bob scans QR-code, sends vc-request
let bob_chatid = dc_join_securejoin(&bob.ctx, &qr).await.unwrap();
dc_join_securejoin(&bob.ctx, &qr).await.unwrap();
let sent = bob.pop_sent_msg().await;
assert_eq!(sent.id(), bob_chatid);
assert_eq!(sent.recipient(), "alice@example.com".parse().unwrap());
let msg = alice.parse_msg(&sent).await;
assert!(!msg.was_encrypted());