Robert Menke
08/25/2019, 6:02 AMDataJpaTest
working I had to add the annotation @ComponentScan("com.my.package")
to the class. Is this normal? If so, is it documented?
@DataJpaTest
@ComponentScan("com.my.package")
class UserTest @Autowired constructor(
private val userService: UserService
): AnnotationSpec() {
@Test fun `Test that findByEmail handles capitalization inconsistencies`() {
val user = User(email = "mYeMail@gmail.COm", password = "password")
val persistedUser = userService.createUser(user)
val email = "MyEmaIL@GMAil.Com"
val found = userService.find(UserEmailIdentity(email))
found.email shouldBe persistedUser.email
}
}
Jukka Siivonen
08/25/2019, 8:26 AMRobert Menke
08/25/2019, 4:40 PM