Add get_channel integration test

This commit is contained in:
bitfl0wer 2023-05-23 15:25:47 +02:00
parent cdd0465a05
commit 43b099b5eb
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 22 additions and 1 deletions

View File

@ -101,7 +101,7 @@ async fn teardown(mut bundle: TestBundle) {
}
mod guild {
use chorus::api::{schemas, types};
use chorus::api::{schemas, types, Channel};
#[tokio::test]
async fn guild_creation_deletion() {
@ -130,4 +130,25 @@ mod guild {
}
crate::teardown(bundle).await
}
#[tokio::test]
async fn get_channel() {
let mut bundle = crate::setup().await;
let bundle_channel = bundle.channel.clone();
let bundle_user = &mut bundle.user;
assert_eq!(
bundle_channel,
Channel::get(
bundle_user.token.as_str(),
bundle.instance.urls.get_api(),
bundle.guild_id.as_str(),
&mut bundle_user.limits,
&mut bundle.instance.limits
)
.await
.unwrap()
);
crate::teardown(bundle).await
}
}