Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Jun 24, 2024
1 parent 1c40c6c commit 75713b7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions xmtp_mls/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ pub fn deserialize_welcome(welcome_bytes: &Vec<u8>) -> Result<Welcome, ClientErr
#[cfg(test)]
mod tests {
use xmtp_cryptography::utils::generate_local_wallet;
use xmtp_id::InboxOwner;

use crate::{
builder::ClientBuilder,
Expand Down Expand Up @@ -713,6 +714,19 @@ mod tests {
assert_eq!(groups[1].group_id, group_2.group_id);
}

#[tokio::test]
async fn test_find_inbox_id() {
let wallet = generate_local_wallet();
let client = ClientBuilder::new_test_client(&wallet).await;
assert_eq!(
client
.find_inbox_id_from_address(wallet.get_address())
.await
.unwrap(),
Some(client.inbox_id())
);
}

#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_sync_welcomes() {
let alice = ClientBuilder::new_test_client(&generate_local_wallet()).await;
Expand Down

0 comments on commit 75713b7

Please sign in to comment.