Replace guild_id with guild object
This commit is contained in:
parent
d51291de3c
commit
789d7ec7e8
|
@ -9,7 +9,7 @@ pub struct TestBundle {
|
|||
pub urls: URLBundle,
|
||||
pub user: UserMeta,
|
||||
pub instance: Instance,
|
||||
pub guild_id: String,
|
||||
pub guild: Guild,
|
||||
pub channel: Channel,
|
||||
}
|
||||
|
||||
|
@ -65,13 +65,13 @@ pub async fn setup() -> TestBundle {
|
|||
video_quality_mode: None,
|
||||
};
|
||||
let mut user = instance.register_account(®).await.unwrap();
|
||||
let guild_id = Guild::create(&mut user, urls.get_api(), guild_create_schema)
|
||||
let guild = Guild::create(&mut user, urls.get_api(), guild_create_schema)
|
||||
.await
|
||||
.unwrap();
|
||||
let channel = Channel::create(
|
||||
&user.token,
|
||||
urls.get_api(),
|
||||
guild_id.as_str(),
|
||||
&guild.id.to_string(),
|
||||
channel_create_schema,
|
||||
&mut user.limits,
|
||||
&mut instance.limits,
|
||||
|
@ -83,7 +83,7 @@ pub async fn setup() -> TestBundle {
|
|||
urls,
|
||||
user,
|
||||
instance,
|
||||
guild_id,
|
||||
guild,
|
||||
channel,
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ pub async fn teardown(mut bundle: TestBundle) {
|
|||
Guild::delete(
|
||||
&mut bundle.user,
|
||||
bundle.instance.urls.get_api(),
|
||||
bundle.guild_id,
|
||||
&bundle.guild.id.to_string(),
|
||||
)
|
||||
.await;
|
||||
bundle.user.delete().await;
|
||||
|
|
Loading…
Reference in New Issue