Fix tests

This commit is contained in:
Conrad Irwin 2023-10-24 09:46:46 +02:00
parent ea4e67fb76
commit e6087e0ed9
2 changed files with 10 additions and 9 deletions

View File

@ -436,10 +436,7 @@ async fn test_channel_buffer_disconnect(
// Channel buffer observed the deletion
channel_buffer_b.update(cx_b, |buffer, cx| {
assert_eq!(
buffer.channel(cx).unwrap().as_ref(),
&channel(channel_id, "the-channel", proto::ChannelRole::Member)
);
assert!(buffer.channel(cx).is_none());
assert!(!buffer.is_connected());
});
}

View File

@ -1,4 +1,5 @@
use crate::{
db::{self, UserId},
rpc::RECONNECT_TIMEOUT,
tests::{room_participants, RoomParticipants, TestServer},
};
@ -292,11 +293,14 @@ async fn test_core_channels(
server.disconnect_client(client_a.peer_id().unwrap());
deterministic.advance_clock(RECEIVE_TIMEOUT + RECONNECT_TIMEOUT);
client_b
.channel_store()
.update(cx_b, |channel_store, cx| {
channel_store.rename(channel_a_id, "channel-a-renamed", cx)
})
server
.app_state
.db
.rename_channel(
db::ChannelId::from_proto(channel_a_id),
UserId::from_proto(client_a.id()),
"channel-a-renamed",
)
.await
.unwrap();