Skip to content

Commit

Permalink
Add missing removeAdminMembers and removeOwnerships (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorWo authored Jan 23, 2025
1 parent fbba8ed commit ebdf1ad
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,14 +480,16 @@ public void validateOptInActionForAlreadyOptedUser() {
fail("should not throw an exception if user does self opt in when user already opted in");
}

try {
try {
updateMemberService.removeIncludeMember(ADMIN, GROUPING, testUid);
updateMemberService.optIn(ADMIN, GROUPING, testUid);
assertTrue(memberService.isMember(GROUPING_INCLUDE, testUid));
} catch (CommandException e) {
fail("Should not throw an exception because opt in operation can be executed after removing include member");
}
updateMemberService.removeIncludeMember(ADMIN, GROUPING, testUid);
updateMemberService.removeIncludeMember(ADMIN, GROUPING, testUid);
updateMemberService.removeAdminMember(ADMIN, testUid);
updateMemberService.removeOwnerships(ADMIN, GROUPING, testUids);
}

@Test
Expand All @@ -511,6 +513,9 @@ public void validateOptOutActionForAlreadyOptedUser() {
} catch (CommandException e) {
fail("Should not throw an exception because opt out operation is not executed after removing include member");
}

updateMemberService.removeAdminMember(ADMIN, testUid);
updateMemberService.removeOwnerships(ADMIN, GROUPING, testUids);
}

private void addGroupMember(String groupPath, String uhIdentifier) {
Expand Down

0 comments on commit ebdf1ad

Please sign in to comment.