Skip to content

Commit 8b977fc

Browse files
netromsjason-p-pickering
authored andcommitted
style: spotless JsonPatchSideEffectControllerTest
1 parent c11ee1e commit 8b977fc

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JsonPatchSideEffectControllerTest.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* this list of conditions and the following disclaimer in the documentation
1313
* and/or other materials provided with the distribution.
1414
*
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
1616
* may be used to endorse or promote products derived from this software without
1717
* specific prior written permission.
1818
*
@@ -84,18 +84,15 @@ void testPatchUserGroupNameKeepsUsers() {
8484
String groupId =
8585
assertStatus(
8686
HttpStatus.CREATED,
87-
POST(
88-
"/userGroups/",
89-
"{'name':'GroupSide','users':[{'id':'" + user.getUid() + "'}]}"));
87+
POST("/userGroups/", "{'name':'GroupSide','users':[{'id':'" + user.getUid() + "'}]}"));
9088

9189
assertStatus(
9290
HttpStatus.OK,
9391
PATCH(
9492
"/userGroups/" + groupId,
9593
"[{'op':'replace','path':'/name','value':'GroupSideRenamed'}]"));
9694

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);
9996

10097
assertEquals("GroupSideRenamed", body.getString("name").string());
10198
assertEquals(1, body.getArray("users").size());
@@ -144,12 +141,9 @@ void testPatchUserRoleUsersPathDoesNotChangeMembership() {
144141
manager.save(role);
145142

146143
// 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':[]}]");
150145

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);
153147

154148
assertEquals(1, body.getArray("users").size());
155149
assertEquals(user.getUid(), body.getArray("users").getObject(0).getString("id").string());

0 commit comments

Comments
 (0)