diff --git a/src/tests/client.rs b/src/tests/client.rs index 53025f0..56a7680 100644 --- a/src/tests/client.rs +++ b/src/tests/client.rs @@ -30,6 +30,23 @@ async fn test_workspace_creation_and_lookup() { }) .await } + +#[tokio::test] +async fn test_cant_create_same_workspace_more_than_once() { + 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?; + assert_or_err!(client.create_workspace(workspace_name).await.is_err()); + Ok(()) + } + }) + .await +} Ok(()) } })