Skip to content

Commit c43b622

Browse files
committed
test: move test_two_group_securejoins from receive_imf to securejoin module
1 parent 73bf698 commit c43b622

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

src/receive_imf/receive_imf_tests.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5099,37 +5099,6 @@ async fn test_rename_chat_after_creating_invite() -> Result<()> {
50995099
Ok(())
51005100
}
51015101

5102-
/// Regression test for the bug
5103-
/// that resulted in an info message
5104-
/// about Bob addition to the group on Fiona's device.
5105-
///
5106-
/// There should be no info messages about implicit
5107-
/// member changes when we are added to the group.
5108-
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
5109-
async fn test_two_group_securejoins() -> Result<()> {
5110-
let mut tcm = TestContextManager::new();
5111-
let alice = &tcm.alice().await;
5112-
let bob = &tcm.bob().await;
5113-
let fiona = &tcm.fiona().await;
5114-
5115-
let group_id = chat::create_group(alice, "Group").await?;
5116-
5117-
let qr = get_securejoin_qr(alice, Some(group_id)).await?;
5118-
5119-
// Bob joins using QR code.
5120-
tcm.exec_securejoin_qr(bob, alice, &qr).await;
5121-
5122-
// Fiona joins using QR code.
5123-
tcm.exec_securejoin_qr(fiona, alice, &qr).await;
5124-
5125-
let fiona_chat_id = fiona.get_last_msg().await.chat_id;
5126-
fiona
5127-
.golden_test_chat(fiona_chat_id, "two_group_securejoins")
5128-
.await;
5129-
5130-
Ok(())
5131-
}
5132-
51335102
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
51345103
async fn test_unverified_member_msg() -> Result<()> {
51355104
let mut tcm = TestContextManager::new();

src/securejoin/securejoin_tests.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,3 +1113,34 @@ async fn test_get_securejoin_qr_name_is_truncated() -> Result<()> {
11131113

11141114
Ok(())
11151115
}
1116+
1117+
/// Regression test for the bug
1118+
/// that resulted in an info message
1119+
/// about Bob addition to the group on Fiona's device.
1120+
///
1121+
/// There should be no info messages about implicit
1122+
/// member changes when we are added to the group.
1123+
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
1124+
async fn test_two_group_securejoins() -> Result<()> {
1125+
let mut tcm = TestContextManager::new();
1126+
let alice = &tcm.alice().await;
1127+
let bob = &tcm.bob().await;
1128+
let fiona = &tcm.fiona().await;
1129+
1130+
let group_id = chat::create_group(alice, "Group").await?;
1131+
1132+
let qr = get_securejoin_qr(alice, Some(group_id)).await?;
1133+
1134+
// Bob joins using QR code.
1135+
tcm.exec_securejoin_qr(bob, alice, &qr).await;
1136+
1137+
// Fiona joins using QR code.
1138+
tcm.exec_securejoin_qr(fiona, alice, &qr).await;
1139+
1140+
let fiona_chat_id = fiona.get_last_msg().await.chat_id;
1141+
fiona
1142+
.golden_test_chat(fiona_chat_id, "two_group_securejoins")
1143+
.await;
1144+
1145+
Ok(())
1146+
}

0 commit comments

Comments
 (0)