Add get_channel integration test
This commit is contained in:
parent
368152e092
commit
797af67d3a
|
@ -101,7 +101,7 @@ async fn teardown(mut bundle: TestBundle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
mod guild {
|
mod guild {
|
||||||
use chorus::api::{schemas, types};
|
use chorus::api::{schemas, types, Channel};
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn guild_creation_deletion() {
|
async fn guild_creation_deletion() {
|
||||||
|
@ -130,4 +130,25 @@ mod guild {
|
||||||
}
|
}
|
||||||
crate::teardown(bundle).await
|
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