DATAJPA-1519 - Fixed broken test.
Made the test more specific which demonstrated that the test was broken in the first place.
This commit is contained in:
@@ -205,7 +205,12 @@ public class UserRepositoryFinderTests {
|
||||
|
||||
@Test // DATAJPA-1519
|
||||
public void escapingInLikeSpels() {
|
||||
assertThat(userRepository.findContainingEscaped("att_"), iterableWithSize(0));
|
||||
|
||||
User extra = new User("extra", "Matt_ew", "extra");
|
||||
userRepository.save(extra);
|
||||
|
||||
List<User> result = userRepository.findContainingEscaped("att_");
|
||||
assertThat(result, containsInAnyOrder(extra));
|
||||
}
|
||||
|
||||
@Test // DATAJPA-829
|
||||
|
||||
@@ -557,7 +557,7 @@ public interface UserRepository
|
||||
List<NameOnlyDto> findByNamedQueryWithConstructorExpression();
|
||||
|
||||
// DATAJPA-1519
|
||||
@Query("select u from User u where u.firstname like %?#{escape([0])}% escape ?#{escapeCharacter()}")
|
||||
@Query("select u from User u where u.lastname like %?#{escape([0])}% escape ?#{escapeCharacter()}")
|
||||
List<User> findContainingEscaped(String namePart);
|
||||
|
||||
interface RolesAndFirstname {
|
||||
|
||||
Reference in New Issue
Block a user