Use contains() instead of indexOf() != -1

This commit is contained in:
Lars Grefer 2019-07-04 19:21:33 +02:00 committed by Josh Cummings
parent e554547593
commit 7dc28ff376
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ public class UserTests {
"ROLE_ONE");
assertThat(AuthorityUtils.authorityListToSet(user.getAuthorities())).contains(
"ROLE_TWO");
assertThat(user.toString().indexOf("rod") != -1).isTrue();
assertThat(user.toString()).contains("rod");
}
@Test