Test removing a contact
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
5d4eb2b7ae
commit
e928c1c61e
1 changed files with 21 additions and 0 deletions
|
@ -5291,6 +5291,27 @@ async fn test_contacts(
|
||||||
[("user_b".to_string(), "online", "free")]
|
[("user_b".to_string(), "online", "free")]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Test removing a contact
|
||||||
|
client_b
|
||||||
|
.user_store
|
||||||
|
.update(cx_b, |store, cx| {
|
||||||
|
store.remove_contact(client_c.user_id().unwrap(), cx)
|
||||||
|
})
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
deterministic.run_until_parked();
|
||||||
|
assert_eq!(
|
||||||
|
contacts(&client_b, cx_b),
|
||||||
|
[
|
||||||
|
("user_a".to_string(), "offline", "free"),
|
||||||
|
("user_d".to_string(), "online", "free")
|
||||||
|
]
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
contacts(&client_c, cx_c),
|
||||||
|
[("user_a".to_string(), "offline", "free"),]
|
||||||
|
);
|
||||||
|
|
||||||
fn contacts(
|
fn contacts(
|
||||||
client: &TestClient,
|
client: &TestClient,
|
||||||
cx: &TestAppContext,
|
cx: &TestAppContext,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue