Add modify_guild test
This commit is contained in:
parent
7eee08459b
commit
29d5fe947c
|
@ -1,4 +1,6 @@
|
|||
use chorus::types::{CreateChannelInviteSchema, Guild, GuildBanCreateSchema, GuildCreateSchema};
|
||||
use chorus::types::{
|
||||
CreateChannelInviteSchema, Guild, GuildBanCreateSchema, GuildCreateSchema, GuildModifySchema,
|
||||
};
|
||||
|
||||
mod common;
|
||||
|
||||
|
@ -66,3 +68,18 @@ async fn guild_create_ban() {
|
|||
.is_err());
|
||||
common::teardown(bundle).await
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn modify_guild() {
|
||||
let mut bundle = common::setup().await;
|
||||
let schema = GuildModifySchema {
|
||||
name: Some("Mycoolguild".to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
let guild_id = bundle.guild.read().unwrap().id;
|
||||
let result = Guild::modify(guild_id, schema, &mut bundle.user)
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(result.name.unwrap(), "Mycoolguild".to_string());
|
||||
common::teardown(bundle).await
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue