Add get_channel integration test
This commit is contained in:
parent
cdd0465a05
commit
43b099b5eb
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue