You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by GitBox <gi...@apache.org> on 2022/10/12 11:51:44 UTC

[GitHub] [syncope] ilgrosso commented on pull request #381: SYNCOPE-1699: Extract key from path if undefined in request body

ilgrosso commented on PR #381:
URL: https://github.com/apache/syncope/pull/381#issuecomment-1276033757

   I think you can also add a test case to `UserIssuesITCase` like the following, which would fail with NPE in the current `master`
   
   ```java
       @Test
       public void issueSYNCOPE1699() throws JsonProcessingException {
           UserTO userTO = createUser(UserITCase.getUniqueSample("syncope1337@apache.org")).getEntity();
   
           UserUR req = new UserUR();
           req.setUsername(new StringReplacePatchItem.Builder().value("newUsername" + getUUIDString()).build());
   
           WebClient webClient = WebClient.create(ADDRESS + "/users/" + userTO.getKey(), ADMIN_UNAME, ADMIN_PWD, null).
                   accept(MediaType.APPLICATION_JSON_TYPE).
                   type(MediaType.APPLICATION_JSON_TYPE);
   
           Response response = webClient.invoke("PATCH", JSON_MAPPER.writeValueAsString(req));
           assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org