Update test to match code changes

This commit is contained in:
bitfl0wer 2023-08-13 16:44:58 +02:00
parent f5d74c57a4
commit 8de2aee513
No known key found for this signature in database
GPG Key ID: 0ACD574FCF5226CF
1 changed files with 10 additions and 3 deletions

View File

@ -30,12 +30,19 @@ async fn test_gateway_authenticate() {
async fn test_self_updating_structs() { 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(); let received_channel = channel_updater.borrow().clone().read().unwrap().clone();
assert_eq!(received_channel, bundle.channel.read().unwrap().clone()); assert_eq!(received_channel, bundle.channel.read().unwrap().clone());
let updater = bundle.user.gateway.observe(bundle.channel.clone()).await; let updater = bundle.user.gateway.observe(bundle.channel.clone()).await;
assert_eq!( assert_eq!(
updater.borrow().clone().name.unwrap(), updater
.borrow()
.clone()
.read()
.unwrap()
.clone()
.name
.unwrap(),
bundle.channel.read().unwrap().clone().name.unwrap() bundle.channel.read().unwrap().clone().name.unwrap()
); );
@ -49,7 +56,7 @@ async fn test_self_updating_structs() {
.unwrap(); .unwrap();
assert_eq!( assert_eq!(
updater.borrow().clone().name.unwrap(), updater.borrow().read().unwrap().clone().name.unwrap(),
"selfupdating".to_string() "selfupdating".to_string()
); );