@Test public void delete_resource_user_permission() { db.prepareDbUnit(getClass(), "resourceUserPermissions.xml"); UserRoleDto userRoleToDelete = new UserRoleDto().setUserId(200L).setRole(UserRole.USER).setResourceId(1L); underTest.deleteUserRole(userRoleToDelete, db.getSession()); db.getSession().commit(); db.assertDbUnit(getClass(), "resourceUserPermissions-result.xml", "user_roles"); }
@Test public void delete_global_user_permission() { db.prepareDbUnit(getClass(), "globalUserPermissions.xml"); UserRoleDto userRoleToDelete = new UserRoleDto().setUserId(200L).setRole(GlobalPermissions.QUALITY_PROFILE_ADMIN); underTest.deleteUserRole(userRoleToDelete, db.getSession()); db.getSession().commit(); db.assertDbUnit(getClass(), "globalUserPermissions-result.xml", "user_roles"); }