|
12 | 12 | * this list of conditions and the following disclaimer in the documentation |
13 | 13 | * and/or other materials provided with the distribution. |
14 | 14 | * |
15 | | - * 3. Neither the name of the copyright holder nor the names of its contributors |
| 15 | + * 3. Neither the name of the copyright holder nor the names of its contributors |
16 | 16 | * may be used to endorse or promote products derived from this software without |
17 | 17 | * specific prior written permission. |
18 | 18 | * |
@@ -84,18 +84,15 @@ void testPatchUserGroupNameKeepsUsers() { |
84 | 84 | String groupId = |
85 | 85 | assertStatus( |
86 | 86 | HttpStatus.CREATED, |
87 | | - POST( |
88 | | - "/userGroups/", |
89 | | - "{'name':'GroupSide','users':[{'id':'" + user.getUid() + "'}]}")); |
| 87 | + POST("/userGroups/", "{'name':'GroupSide','users':[{'id':'" + user.getUid() + "'}]}")); |
90 | 88 |
|
91 | 89 | assertStatus( |
92 | 90 | HttpStatus.OK, |
93 | 91 | PATCH( |
94 | 92 | "/userGroups/" + groupId, |
95 | 93 | "[{'op':'replace','path':'/name','value':'GroupSideRenamed'}]")); |
96 | 94 |
|
97 | | - JsonObject body = |
98 | | - GET("/userGroups/{id}?fields=name,users[id]", groupId).content(HttpStatus.OK); |
| 95 | + JsonObject body = GET("/userGroups/{id}?fields=name,users[id]", groupId).content(HttpStatus.OK); |
99 | 96 |
|
100 | 97 | assertEquals("GroupSideRenamed", body.getString("name").string()); |
101 | 98 | assertEquals(1, body.getArray("users").size()); |
@@ -144,12 +141,9 @@ void testPatchUserRoleUsersPathDoesNotChangeMembership() { |
144 | 141 | manager.save(role); |
145 | 142 |
|
146 | 143 | // Non-owner path: may return OK with ERRORS_NOT_OWNER notes; membership must not drop. |
147 | | - PATCH( |
148 | | - "/userRoles/" + role.getUid(), |
149 | | - "[{'op':'replace','path':'/users','value':[]}]"); |
| 144 | + PATCH("/userRoles/" + role.getUid(), "[{'op':'replace','path':'/users','value':[]}]"); |
150 | 145 |
|
151 | | - JsonObject body = |
152 | | - GET("/userRoles/{id}?fields=users[id]", role.getUid()).content(HttpStatus.OK); |
| 146 | + JsonObject body = GET("/userRoles/{id}?fields=users[id]", role.getUid()).content(HttpStatus.OK); |
153 | 147 |
|
154 | 148 | assertEquals(1, body.getArray("users").size()); |
155 | 149 | assertEquals(user.getUid(), body.getArray("users").getObject(0).getString("id").string()); |
|
0 commit comments