Skip to content

Commit

Permalink
Fix 'noSuchProperty' test case.
Browse files Browse the repository at this point in the history
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.

Forward ported to 3.0.x

See #2418.
  • Loading branch information
gregturn committed Jan 25, 2022
1 parent 621eb18 commit 881bfbd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void errorsDueToMissingPropertyContainNameOfMethodAndInterface() throws Exceptio
assertThatExceptionOfType(IllegalArgumentException.class) //
.isThrownBy(() -> new PartTreeJpaQuery(method, entityManager)) //
.withMessageContaining("findByNoSuchProperty") // the method being analyzed
.withMessageContaining(" noSuchProperty ") // the property we are looking for
.withMessageContaining("'noSuchProperty'") // the property we are looking for
.withMessageContaining("UserRepository"); // the repository
}

Expand Down

0 comments on commit 881bfbd

Please sign in to comment.