mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: delete workspace after deleting from remote (#4830)
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user