Try calling new method to see if it panics
This commit is contained in:
parent
7de3204f59
commit
c3be91667b
|
@ -1,7 +1,7 @@
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
use chorus::gateway::*;
|
use chorus::gateway::*;
|
||||||
use chorus::types::{self, Channel, ChannelModifySchema};
|
use chorus::types::{self, Channel, ChannelModifySchema, Composite};
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
/// Tests establishing a connection (hello and heartbeats) on the local gateway;
|
/// Tests establishing a connection (hello and heartbeats) on the local gateway;
|
||||||
|
@ -31,7 +31,10 @@ async fn test_self_updating_structs() {
|
||||||
let mut bundle = common::setup().await;
|
let mut bundle = common::setup().await;
|
||||||
let channel_updater = bundle.user.gateway.observe(bundle.channel.clone()).await;
|
let channel_updater = bundle.user.gateway.observe(bundle.channel.clone()).await;
|
||||||
let received_channel = channel_updater.borrow().clone().read().unwrap().clone();
|
let received_channel = channel_updater.borrow().clone().read().unwrap().clone();
|
||||||
|
let something =
|
||||||
|
Composite::<Channel>::watch_whole(received_channel.clone(), &bundle.user.gateway);
|
||||||
assert_eq!(received_channel, bundle.channel.read().unwrap().clone());
|
assert_eq!(received_channel, bundle.channel.read().unwrap().clone());
|
||||||
|
drop(something);
|
||||||
|
|
||||||
let updater = bundle.user.gateway.observe(bundle.channel.clone()).await;
|
let updater = bundle.user.gateway.observe(bundle.channel.clone()).await;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|
Loading…
Reference in New Issue