File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
spring-data-jpa-exercises-util/src/main/java/com/bobocode/util
user-service/src/test/java/com/bobocode Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public User generateUser(RoleType... roles) {
3838 return user ;
3939 }
4040
41- private User generateUserWithoutRoles () {
41+ public User generateUserWithoutRoles () {
4242 Fairy fairy = Fairy .create ();
4343 Person person = fairy .person ();
4444
Original file line number Diff line number Diff line change @@ -193,6 +193,9 @@ public void testGetUserByNotExistingEmail() {
193193 @ Test
194194 public void testAddRoleToAllUsers () {
195195 List <User > userList = Stream .generate (dataGenerator ::generateUser ).limit (10 ).collect (toList ());
196+ User userWithoutRoles = dataGenerator .generateUserWithoutRoles ();
197+ userList .add (userWithoutRoles );
198+
196199 userRepository .saveAll (userList );
197200
198201 userService .addRoleToAllUsers (RoleType .OPERATOR );
You can’t perform that action at this time.
0 commit comments