Skip to content

Commit bb7f8e9

Browse files
committed
Fix test_escaped_recipients
1 parent dd7ce48 commit bb7f8e9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/receive_imf/tests.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,15 +566,15 @@ async fn test_escaped_recipients() {
566566
.unwrap()
567567
.0;
568568

569+
// We test with non-chat message here
570+
// because chat messages are not expected to have `Cc` header.
569571
receive_imf(
570572
&t,
571573
b"From: Foobar <foobar@example.com>\n\
572574
To: =?UTF-8?B?0JjQvNGPLCDQpNCw0LzQuNC70LjRjw==?= alice@example.org\n\
573575
Cc: =?utf-8?q?=3Ch2=3E?= <carl@host.tld>\n\
574576
Subject: foo\n\
575577
Message-ID: <asdklfjjaweofi@example.com>\n\
576-
Chat-Version: 1.0\n\
577-
Chat-Disposition-Notification-To: <foobar@example.com>\n\
578578
Date: Sun, 22 Mar 2020 22:37:57 +0000\n\
579579
\n\
580580
hello\n",
@@ -590,9 +590,8 @@ async fn test_escaped_recipients() {
590590
let msg = Message::load_from_db(&t, chats.get_msg_id(0).unwrap().unwrap())
591591
.await
592592
.unwrap();
593-
assert_eq!(msg.is_dc_message, MessengerMessage::Yes);
594-
assert_eq!(msg.text, "hello");
595-
assert_eq!(msg.param.get_int(Param::WantsMdn).unwrap(), 1);
593+
assert_eq!(msg.is_dc_message, MessengerMessage::No);
594+
assert_eq!(msg.text, "foo – hello");
596595
}
597596

598597
/// Tests that `Cc` header updates display name

0 commit comments

Comments
 (0)