chore: remove unneeded test

This commit is contained in:
Zack Fu Zi Xiang 2024-02-22 12:55:49 +08:00
parent ad0f477505
commit 1c7966a486
No known key found for this signature in database
GPG Key ID: 39DE600AFEEED522
1 changed files with 0 additions and 47 deletions

View File

@ -73,50 +73,3 @@ async fn add_and_delete_workspace_for_non_owner_user() {
let member_workspaces = member.get_workspaces().await.unwrap();
assert_eq!(member_workspaces.0.len(), 1);
}
#[tokio::test]
async fn test_workspace_rename() {
let (c, _user) = generate_unique_registered_user_client().await;
let workspace_id = c
.get_workspaces()
.await
.unwrap()
.0
.first()
.unwrap()
.workspace_id;
let desired_new_name = "tom's workspace";
{
c.patch_workspace(PatchWorkspaceParam {
workspace_id,
workspace_name: Some(desired_new_name.to_string()),
})
.await
.expect("Failed to rename workspace");
let workspaces = c.get_workspaces().await.expect("Failed to get workspaces");
let actual_new_name = &workspaces
.0
.first()
.expect("No workspace found")
.workspace_name;
assert_eq!(actual_new_name, desired_new_name);
}
{
c.patch_workspace(PatchWorkspaceParam {
workspace_id,
workspace_name: None,
})
.await
.expect("Failed to rename workspace");
let workspaces = c.get_workspaces().await.expect("Failed to get workspaces");
let actual_new_name = &workspaces
.0
.first()
.expect("No workspace found")
.workspace_name;
assert_eq!(actual_new_name, desired_new_name);
}
}