Test singular role

This commit is contained in:
Flori Weber 2023-06-10 19:42:41 +02:00
parent e5aff12f94
commit e9f1f339d4
No known key found for this signature in database
GPG Key ID: 0ACD574FCF5226CF
1 changed files with 13 additions and 0 deletions

View File

@ -34,3 +34,16 @@ async fn create_and_get_roles() {
assert_eq!(role, expected); assert_eq!(role, expected);
common::teardown(bundle).await common::teardown(bundle).await
} }
#[tokio::test]
async fn get_singular_role() {
let mut bundle = common::setup().await;
let guild_id = &bundle.guild.id.to_string();
let role_id = &bundle.role.id.to_string();
let role = bundle.role.clone();
let same_role = chorus::types::RoleObject::get(&mut bundle.user, guild_id, role_id)
.await
.unwrap();
assert_eq!(role, same_role);
common::teardown(bundle).await
}