Reflect changes to Channel::modify() in test

This commit is contained in:
Flori Weber 2023-06-22 18:55:26 +02:00
parent d21dc931f0
commit 99da624c15
1 changed files with 3 additions and 2 deletions

View File

@ -31,6 +31,7 @@ async fn delete_channel() {
#[tokio::test] #[tokio::test]
async fn modify_channel() { async fn modify_channel() {
let mut bundle = common::setup().await; let mut bundle = common::setup().await;
let channel = &mut bundle.channel;
let modify_data: types::ChannelModifySchema = types::ChannelModifySchema { let modify_data: types::ChannelModifySchema = types::ChannelModifySchema {
name: Some("beepboop".to_string()), name: Some("beepboop".to_string()),
channel_type: None, channel_type: None,
@ -50,10 +51,10 @@ async fn modify_channel() {
default_thread_rate_limit_per_user: None, default_thread_rate_limit_per_user: None,
video_quality_mode: None, video_quality_mode: None,
}; };
let result = Channel::modify(modify_data, bundle.channel.id, &mut bundle.user) Channel::modify(channel, modify_data, channel.id, &mut bundle.user)
.await .await
.unwrap(); .unwrap();
assert_eq!(result.name, Some("beepboop".to_string())); assert_eq!(channel.name, Some("beepboop".to_string()));
let permission_override = PermissionFlags::from_vec(Vec::from([ let permission_override = PermissionFlags::from_vec(Vec::from([
PermissionFlags::MANAGE_CHANNELS, PermissionFlags::MANAGE_CHANNELS,