From c3be91667be31cfcd5a954e073af46ddfcdb3d53 Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Tue, 15 Aug 2023 17:54:48 +0200 Subject: [PATCH] Try calling new method to see if it panics --- tests/gateway.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/gateway.rs b/tests/gateway.rs index 2a9e38c..10ae04d 100644 --- a/tests/gateway.rs +++ b/tests/gateway.rs @@ -1,7 +1,7 @@ mod common; use chorus::gateway::*; -use chorus::types::{self, Channel, ChannelModifySchema}; +use chorus::types::{self, Channel, ChannelModifySchema, Composite}; #[tokio::test] /// 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 channel_updater = bundle.user.gateway.observe(bundle.channel.clone()).await; let received_channel = channel_updater.borrow().clone().read().unwrap().clone(); + let something = + Composite::::watch_whole(received_channel.clone(), &bundle.user.gateway); assert_eq!(received_channel, bundle.channel.read().unwrap().clone()); + drop(something); let updater = bundle.user.gateway.observe(bundle.channel.clone()).await; assert_eq!(