mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-21 23:04:49 +01:00
test: can't create workspace more than once
This commit is contained in:
parent
44e5e390eb
commit
9ff9a47d86
1 changed files with 17 additions and 0 deletions
|
@ -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(())
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue