test: fix group tests

no idea how these passed on gh runner
This commit is contained in:
Barış Soner Uşaklı
2023-04-28 16:43:49 -04:00
parent c23689d305
commit b891c5accd
2 changed files with 21 additions and 27 deletions

View File

@@ -155,13 +155,14 @@ groupsAPI.leave = async function (caller, data) {
groups.isMember(data.uid, groupName),
]);
if (!userExists) {
throw new Error('[[error:invalid-uid]]');
}
if (!isMember) {
throw new Error('[[error:group-not-member]]');
}
if (!userExists) {
throw new Error('[[error:invalid-uid]]');
}
if (groupData.disableLeave && isSelf) {
throw new Error('[[error:group-leave-disabled]]');
}