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