diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/security/ClarinShibbolethLoginFilterIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/security/ClarinShibbolethLoginFilterIT.java index 343f0c5fe035..6cf8c6058d7a 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/security/ClarinShibbolethLoginFilterIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/security/ClarinShibbolethLoginFilterIT.java @@ -276,6 +276,9 @@ public void testShouldReturnDuplicateUserErrorLoginWithoutNetId() throws Excepti .andExpect(redirectedUrl("http://localhost:4000/login/duplicate-user?email=" + email)) .andReturn().getResponse().getHeader("Authorization"); + // Check if was created a user with such email and netid. + EPerson ePerson = checkUserWasCreated(netId, IDP_TEST_EPERSON, email, null); + deleteShibbolethUser(ePerson); } // This test is copied from the `ShibbolethLoginFilterIT` and modified following the Clarin updates. @@ -567,6 +570,7 @@ public void testSuccessFullLoginWithTwoEmails() throws Exception { checkUserIsSignedIn(token); // Find the user by the second email EPerson ePerson = checkUserWasCreated(null, IDP_TEST_EPERSON, secondEmail, null); + assertTrue(Objects.nonNull(ePerson)); deleteShibbolethUser(ePerson); }