jamesidw commented on a change in pull request #660: FINERACT-803: validate 
username uniqueness
URL: https://github.com/apache/fineract/pull/660#discussion_r352269957
 
 

 ##########
 File path: 
fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/useradministration/users/UserHelper.java
 ##########
 @@ -32,21 +32,46 @@ public static Integer createUser(final 
RequestSpecification requestSpec, final R
         return Utils.performServerPost(requestSpec, responseSpec, 
CREATE_USER_URL, getTestCreateUserAsJSON(roleId, staffId), "resourceId");
     }
 
+    public static Object createUser(final RequestSpecification requestSpec, 
final ResponseSpecification responseSpec, int roleId, int staffId, String 
username, String attribute) {
+        return Utils.performServerPost(requestSpec, responseSpec, 
CREATE_USER_URL, getTestCreateUserAsJSON(roleId, staffId, username), attribute);
+    }
+
     public static String getTestCreateUserAsJSON(int roleId, int staffId) {
         String json = "{ \"username\": \"" + 
Utils.randomNameGenerator("User_Name_", 3)
                 + "\", \"firstname\": \"Test\", \"lastname\": \"User\", 
\"email\": \"[email protected]\","
                 + " \"officeId\": \"1\", \"staffId\": " + "\""
-                + Integer.toString(staffId)+"\",\"roles\": [\""
-                + Integer.toString(roleId) + "\"], \"sendPasswordToEmail\": 
false}";
+                + staffId +"\",\"roles\": [\""
+                + roleId + "\"], \"sendPasswordToEmail\": false}";
         System.out.println(json);
 
 Review comment:
   Sure. I've removed them

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to