Skip to content

Commit 7dc28ff

Browse files
larsgreferjzheaux
authored andcommitted
Use contains() instead of indexOf() != -1
1 parent e554547 commit 7dc28ff

File tree

1 file changed

+1
-1
lines changed
  • core/src/test/java/org/springframework/security/core/userdetails

1 file changed

+1
-1
lines changed

core/src/test/java/org/springframework/security/core/userdetails/UserTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void testUserGettersSetter() throws Exception {
129129
"ROLE_ONE");
130130
assertThat(AuthorityUtils.authorityListToSet(user.getAuthorities())).contains(
131131
"ROLE_TWO");
132-
assertThat(user.toString().indexOf("rod") != -1).isTrue();
132+
assertThat(user.toString()).contains("rod");
133133
}
134134

135135
@Test

0 commit comments

Comments
 (0)