diff --git a/core/src/test/java/org/springframework/security/core/userdetails/jdbc/JdbcDaoImplTests.java b/core/src/test/java/org/springframework/security/core/userdetails/jdbc/JdbcDaoImplTests.java index 6d3fabaae2..a4768c23b6 100644 --- a/core/src/test/java/org/springframework/security/core/userdetails/jdbc/JdbcDaoImplTests.java +++ b/core/src/test/java/org/springframework/security/core/userdetails/jdbc/JdbcDaoImplTests.java @@ -89,7 +89,6 @@ public class JdbcDaoImplTests extends TestCase { dao.loadUserByUsername("cooper"); fail("Should have thrown UsernameNotFoundException"); } catch (UsernameNotFoundException expected) { - assertEquals("User cooper has no GrantedAuthority", expected.getMessage()); } } diff --git a/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java b/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java index 3ac33958e3..943fd5be53 100644 --- a/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java +++ b/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java @@ -158,7 +158,7 @@ public class SwitchUserFilterTests { filter.doFilter(request, response, chain); verify(chain, never()).doFilter(request, response); - assertEquals("Authentication Failed: User is disabled", response.getErrorMessage()); + assertNotNull(response.getErrorMessage()); // Now check for the redirect request.setContextPath("/mywebapp");