fix: publish nothing test case
This commit is contained in:
parent
c185063847
commit
b122e845b0
|
|
@ -83,15 +83,6 @@ async fn test_publish_doc() {
|
||||||
let publish_name_2 = "publish-name-2";
|
let publish_name_2 = "publish-name-2";
|
||||||
let view_id_2 = uuid::Uuid::new_v4();
|
let view_id_2 = uuid::Uuid::new_v4();
|
||||||
|
|
||||||
{
|
|
||||||
// cannot publish nothing
|
|
||||||
let err = c
|
|
||||||
.publish_collabs::<MyCustomMetadata, &[u8]>(&workspace_id, vec![])
|
|
||||||
.await
|
|
||||||
.unwrap_err();
|
|
||||||
assert_eq!(err.code, ErrorCode::InvalidRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
c.publish_collabs::<MyCustomMetadata, &[u8]>(
|
c.publish_collabs::<MyCustomMetadata, &[u8]>(
|
||||||
&workspace_id,
|
&workspace_id,
|
||||||
vec![
|
vec![
|
||||||
|
|
@ -557,10 +548,14 @@ async fn test_publish_load_test() {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// publish nothing
|
{
|
||||||
c.publish_collabs::<(), &[u8]>(&workspace_id, vec![])
|
// cannot publish nothing
|
||||||
.await
|
let err = c
|
||||||
.unwrap();
|
.publish_collabs::<(), &[u8]>(&workspace_id, vec![])
|
||||||
|
.await
|
||||||
|
.unwrap_err();
|
||||||
|
assert_eq!(err.code, ErrorCode::InvalidRequest);
|
||||||
|
}
|
||||||
|
|
||||||
// publish nothing with metadata
|
// publish nothing with metadata
|
||||||
c.publish_collabs::<MyCustomMetadata, &[u8]>(&workspace_id, vec![])
|
c.publish_collabs::<MyCustomMetadata, &[u8]>(&workspace_id, vec![])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue