Skip to content

Commit

Permalink
remove outdated test
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Jan 17, 2025
1 parent 4464895 commit 4bb40c9
Showing 1 changed file with 0 additions and 82 deletions.
82 changes: 0 additions & 82 deletions bindings_ffi/src/mls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3131,88 +3131,6 @@ mod tests {
);
}

#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn test_conversation_list_ordering() {
// Step 1: Setup test client
let client = new_test_client().await;
let conversations_api = client.conversations();

// Step 2: Create Group A
let group_a = conversations_api
.create_group(vec![], FfiCreateGroupOptions::default())
.await
.unwrap();

// Step 3: Create Group B
let group_b = conversations_api
.create_group(vec![], FfiCreateGroupOptions::default())
.await
.unwrap();

// Step 4: Send a message to Group A
group_a
.send("Message to Group A".as_bytes().to_vec())
.await
.unwrap();

// Step 5: Create Group C
let group_c = conversations_api
.create_group(vec![], FfiCreateGroupOptions::default())
.await
.unwrap();

// Step 6: Synchronize conversations
conversations_api
.sync_all_conversations(None)
.await
.unwrap();

// Step 7: Fetch the conversation list
let conversations = conversations_api
.list(FfiListConversationsOptions::default())
.unwrap();

// Step 8: Assert the correct order of conversations
assert_eq!(
conversations.len(),
3,
"There should be exactly 3 conversations"
);

// Verify the order: Group C, Group A, Group B
assert_eq!(
conversations[0].conversation.inner.group_id, group_c.inner.group_id,
"Group C should be the first conversation"
);
assert_eq!(
conversations[1].conversation.inner.group_id, group_a.inner.group_id,
"Group A should be the second conversation"
);
assert_eq!(
conversations[2].conversation.inner.group_id, group_b.inner.group_id,
"Group B should be the third conversation"
);

// Verify the last_message field for Group A and None for others
assert!(
conversations[0].last_message.is_none(),
"Group C should have no messages"
);
assert!(
conversations[1].last_message.is_some(),
"Group A should have a last message"
);
assert_eq!(
conversations[1].last_message.as_ref().unwrap().content,
"Message to Group A".as_bytes().to_vec(),
"Group A's last message content should match"
);
assert!(
conversations[2].last_message.is_none(),
"Group B should have no messages"
);
}

#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn test_conversation_list_filters_readable_messages() {
// Step 1: Setup test client
Expand Down

0 comments on commit 4bb40c9

Please sign in to comment.