Upgrade to ktorm 3.0.0, remove email field from users

This commit is contained in:
2020-06-18 16:33:18 +02:00
parent 3221b490ea
commit 214286a6eb
17 changed files with 90 additions and 225 deletions
@@ -14,41 +14,17 @@ class RegisterValidationTest {
val violations = registerValidator.validate(User {
username = "hubert"
password = "definitelyNotMyPassword"
email = "test@mail.com"
})
violations.isValid `should be equal to` true
}
@Test
fun `invalid email test`() {
val violations = registerValidator.validate(User {
username = "hubert"
password = "definitelyNotMyPassword"
email = "teom"
})
violations.isValid `should be equal to` false
violations.firstInvalid `should be equal to` "email"
}
@Test
fun `missing email test`() {
val violations = registerValidator.validate(User {
username = "hubert"
password = "definitelyNotMyPassword"
})
violations.isValid `should be equal to` false
violations.firstInvalid `should be equal to` "email"
}
@Test
fun `username too long test`() {
val violations = registerValidator.validate(User {
username = "6X9iboWmEOWjVjkO328ReTJ1gGPTTmB/ZGgBLhB6EzAJoWkJht8"
password = "definitelyNotMyPassword"
email = "test@mail.com"
})
violations.isValid `should be equal to` false