fix: delete workspace after deleting from remote (#4830)

This commit is contained in:
Zack
2024-03-06 17:27:52 +08:00
committed by GitHub
parent 66aea29ab7
commit 6e2caf3358
2 changed files with 35 additions and 0 deletions

View File

@ -7,6 +7,27 @@ use flowy_user::protobuf::UserNotification;
use crate::util::receive_with_timeout;
#[tokio::test]
async fn af_cloud_workspace_delete() {
user_localhost_af_cloud().await;
let test = EventIntegrationTest::new().await;
let user_profile_pb = test.af_cloud_sign_up().await;
let workspaces = get_synced_workspaces(&test, user_profile_pb.id).await;
assert_eq!(workspaces.len(), 1);
let created_workspace = test.create_workspace("my second workspace").await;
assert_eq!(created_workspace.name, "my second workspace");
let workspaces = get_synced_workspaces(&test, user_profile_pb.id).await;
assert_eq!(workspaces.len(), 2);
test.delete_workspace(&created_workspace.workspace_id).await;
let workspaces = get_synced_workspaces(&test, user_profile_pb.id).await;
assert_eq!(workspaces.len(), 1);
let workspaces = test.get_all_workspaces().await.items;
assert_eq!(workspaces.len(), 1);
}
#[tokio::test]
async fn af_cloud_workspace_name_change() {
user_localhost_af_cloud().await;