move channel test to channel

This commit is contained in:
bitfl0wer 2023-05-27 22:12:15 +02:00
parent c85ac2d663
commit 3028d8f70a
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 23 additions and 0 deletions

23
tests/channel.rs Normal file
View File

@ -0,0 +1,23 @@
mod common;
use chorus::types::Channel;
#[tokio::test]
async fn get_channel() {
let mut bundle = common::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_channel.id.to_string(),
&mut bundle_user.limits,
&mut bundle.instance.limits
)
.await
.unwrap()
);
common::teardown(bundle).await
}