Skip to content

Commit a5915f9

Browse files
authored
fix: Remove invalid Group membership role (#1171)
Closes: SDK-3163
1 parent 9e63607 commit a5915f9

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/main/java/com/box/sdk/BoxGroupMembership.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ public enum GroupRole {
8888
*/
8989
ADMIN("admin"),
9090

91-
/**
92-
* The user is a coadmin in the group.
93-
*/
94-
COADMIN("submaster"),
95-
9691
/**
9792
* The user is a regular member in the group.
9893
*/

src/test/java/com/box/sdk/BoxGroupMembershipTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class BoxGroupMembershipTest {
1818
*/
1919
@Test
2020
public void testUpdateInfoSendsCorrectJson() {
21-
final BoxGroupMembership.GroupRole groupRole = BoxGroupMembership.GroupRole.COADMIN;
21+
final BoxGroupMembership.GroupRole groupRole = BoxGroupMembership.GroupRole.ADMIN;
2222

2323
BoxAPIConnection api = new BoxAPIConnectionForTests("");
2424
api.setRequestInterceptor(new JSONRequestInterceptor() {
@@ -52,7 +52,7 @@ public void testUpdateInfoParseAllFieldsCorrectly() throws ParseException {
5252
final String userLogin = "alice@gmail.com";
5353
final String groupID = "119720";
5454
final String groupName = "family";
55-
final BoxGroupMembership.GroupRole groupRole = BoxGroupMembership.GroupRole.COADMIN;
55+
final BoxGroupMembership.GroupRole groupRole = BoxGroupMembership.GroupRole.ADMIN;
5656
final Date createdAt = BoxDateFormat.parse("2013-05-16T15:27:57-07:00");
5757
final Date modifiedAt = BoxDateFormat.parse("2013-05-16T15:27:57-07:00");
5858

@@ -70,7 +70,7 @@ public void testUpdateInfoParseAllFieldsCorrectly() throws ParseException {
7070
+ " \"id\": \"119720\",\n"
7171
+ " \"name\": \"family\"\n"
7272
+ " },\n"
73-
+ " \"role\": \"submaster\",\n"
73+
+ " \"role\": \"admin\",\n"
7474
+ " \"created_at\": \"2013-05-16T15:27:57-07:00\",\n"
7575
+ " \"modified_at\": \"2013-05-16T15:27:57-07:00\"\n"
7676
+ "}").asObject();
@@ -79,7 +79,7 @@ public void testUpdateInfoParseAllFieldsCorrectly() throws ParseException {
7979
api.setRequestInterceptor(JSONRequestInterceptor.respondWith(fakeJSONResponse));
8080
BoxGroupMembership membership = new BoxGroupMembership(api, id);
8181
BoxGroupMembership.Info info = membership.new Info();
82-
info.setGroupRole(BoxGroupMembership.GroupRole.COADMIN);
82+
info.setGroupRole(BoxGroupMembership.GroupRole.ADMIN);
8383
membership.updateInfo(info);
8484
assertEquals(id, info.getID());
8585
assertEquals(userID, info.getUser().getID());

0 commit comments

Comments
 (0)