Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mfriesen committed Jul 6, 2024
1 parent bd01341 commit dac4f30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ private static void deleteGroup(final UserManagementApi userApi, final String gr
assertEquals("Group " + groupName + " deleted", deleteResponse.getMessage());
}

private static void addGroup(final UserManagementApi userApi, final String groupName)
throws ApiException {
private static void addGroup(final UserManagementApi userApi, final String groupName,
final String groupDescription) throws ApiException {
// given
AddGroupRequest req = new AddGroupRequest().group(new AddGroup().name(groupName));
AddGroupRequest req =
new AddGroupRequest().group(new AddGroup().name(groupName).description(groupDescription));

// when
AddResponse response = userApi.addGroup(req);
Expand Down Expand Up @@ -251,7 +252,7 @@ public void testAddGroupAndUser01() throws Exception {

// when
addUser(userApi, email);
addGroup(userApi, groupName);
addGroup(userApi, groupName, "some desc");
addUserToGroup(userApi, email, groupName);

// then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ public String getGroupName() throws BadException {
* @throws BadException BadException
*/
public String getGroupDescription() throws BadException {
String groupDescription = getGroup().getDescription();
if (isEmpty(groupDescription)) {
throw new BadException("invalid 'groupDescription'");
}

return groupDescription;
return getGroup().getDescription();
}
}

0 comments on commit dac4f30

Please sign in to comment.