From fdd272646def49cd60e7abe8dd9f441e4322ba38 Mon Sep 17 00:00:00 2001 From: cschen Date: Sun, 3 Nov 2024 17:21:06 +0100 Subject: [PATCH] test: attaching to a non existing workspace is an error --- src/tests/client.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/tests/client.rs b/src/tests/client.rs index 14c57f9..5a5468d 100644 --- a/src/tests/client.rs +++ b/src/tests/client.rs @@ -67,6 +67,24 @@ async fn test_workspace_attach_and_active_workspaces() { }) .await } + +#[tokio::test] +async fn test_attaching_to_non_existing_is_error() { + ClientFixture::of("alice") + .with(|client| { + let client = client.clone(); + + async move { + let workspace_name = uuid::Uuid::new_v4().to_string(); + + // we don't create any workspace. + // client.create_workspace(workspace_name).await?; + assert_or_err!(client.attach_workspace(&workspace_name).await.is_err()); + Ok(()) + } + }) + .await +} Ok(()) } })