Skip to content

Commit 32ffebf

Browse files
committed
Fix 'noSuchProperty' test case.
The error message for nonexistent properties inside query derivation now wraps the named property with single quotes. This breaks a test case that was looking for spaces before and after. Closes #2418.
1 parent 192bec3 commit 32ffebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void errorsDueToMissingPropertyContainNameOfMethodAndInterface() throws Exceptio
222222
assertThatExceptionOfType(IllegalArgumentException.class) //
223223
.isThrownBy(() -> new PartTreeJpaQuery(method, entityManager)) //
224224
.withMessageContaining("findByNoSuchProperty") // the method being analyzed
225-
.withMessageContaining(" noSuchProperty ") // the property we are looking for
225+
.withMessageContaining("'noSuchProperty'") // the property we are looking for
226226
.withMessageContaining("UserRepository"); // the repository
227227
}
228228

0 commit comments

Comments
 (0)