From 9d0c961ac25fb1cdbeca60f36881b199776f812c Mon Sep 17 00:00:00 2001 From: cschen Date: Sun, 3 Nov 2024 17:22:41 +0100 Subject: [PATCH] test: delete empty workspace --- src/tests/client.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/tests/client.rs b/src/tests/client.rs index 16874b3..a972628 100644 --- a/src/tests/client.rs +++ b/src/tests/client.rs @@ -128,9 +128,27 @@ async fn test_attach_and_leave_workspace_interactions() { }) .await } + +#[tokio::test] +async fn test_delete_empty_workspace() { + ClientFixture::of("alice") + .with(|client| { + let client = client.clone(); + + async move { + let workspace_name = uuid::Uuid::new_v4().to_string(); + + client.create_workspace(&workspace_name).await?; + client.delete_workspace(&workspace_name).await?; + + assert_or_err!(client.get_workspace(&workspace_name).is_none()); + assert_or_err!(client.fetch_owned_workspaces().await?.is_empty()); + Ok(()) } }) + .await +} .await; }