test: attaching to a non existing workspace is an error

This commit is contained in:
cschen 2024-11-03 17:21:06 +01:00
parent ccb5406ccf
commit fdd272646d

View file

@ -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(())
}
})