From 8de2aee513fb0f857b9e25374d433f194ff228ce Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Sun, 13 Aug 2023 16:44:58 +0200 Subject: [PATCH] Update test to match code changes --- tests/gateway.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/gateway.rs b/tests/gateway.rs index b0570c0..2a9e38c 100644 --- a/tests/gateway.rs +++ b/tests/gateway.rs @@ -30,12 +30,19 @@ async fn test_gateway_authenticate() { 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(); + let received_channel = channel_updater.borrow().clone().read().unwrap().clone(); assert_eq!(received_channel, bundle.channel.read().unwrap().clone()); let updater = bundle.user.gateway.observe(bundle.channel.clone()).await; assert_eq!( - updater.borrow().clone().name.unwrap(), + updater + .borrow() + .clone() + .read() + .unwrap() + .clone() + .name + .unwrap(), bundle.channel.read().unwrap().clone().name.unwrap() ); @@ -49,7 +56,7 @@ async fn test_self_updating_structs() { .unwrap(); assert_eq!( - updater.borrow().clone().name.unwrap(), + updater.borrow().read().unwrap().clone().name.unwrap(), "selfupdating".to_string() );