chore: fix tests

This commit is contained in:
Zack Fu Zi Xiang 2024-09-13 12:19:07 +08:00
parent 53c98c8bd6
commit 0fd23d0b9f
No known key found for this signature in database
1 changed files with 5 additions and 3 deletions

View File

@ -93,8 +93,9 @@ async fn add_duplicate_workspace_members() {
.await
.unwrap();
// next invite should do nothing since c2 is already a workspace member
c1.api_client
// next invite should return error since the user is already in the workspace
let err = c1
.api_client
.invite_workspace_members(
&workspace_id,
vec![WorkspaceMemberInvitation {
@ -103,7 +104,8 @@ async fn add_duplicate_workspace_members() {
}],
)
.await
.unwrap();
.unwrap_err();
assert_eq!(err.code, ErrorCode::InvalidRequest, "{:?}", err);
// should not find any invitation
let invitations = c2