mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-24 16:14:48 +01:00
test: deleting twice or non existing is an error
This commit is contained in:
parent
9d0c961ac2
commit
35b9b12aaf
1 changed files with 19 additions and 0 deletions
|
@ -149,6 +149,25 @@ async fn test_delete_empty_workspace() {
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn test_deleting_twice_or_non_existing_is_an_error() {
|
||||||
|
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.delete_workspace(&workspace_name).await.is_err());
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.await
|
||||||
|
}
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue