Upgrade to ktorm 3.0.0, remove email field from users
This commit is contained in:
@@ -39,17 +39,12 @@ class UserServiceTest {
|
||||
fun `test create user`() {
|
||||
runBlocking {
|
||||
val username = "hubert"
|
||||
val email = "a@a"
|
||||
val password = "password"
|
||||
|
||||
userService.createUser(username, email, password)
|
||||
val id = userService.getUserId(email)
|
||||
id `should not be` null
|
||||
|
||||
userService.getUserInfo(id!!)!!.let {
|
||||
it.username `should be equal to` username
|
||||
it.email `should be equal to` email
|
||||
}
|
||||
userService.create(username, password)
|
||||
val user = userService.find(username)
|
||||
user `should not be` null
|
||||
user?.username `should be equal to` username
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +52,7 @@ class UserServiceTest {
|
||||
@Order(2)
|
||||
fun `test create same user`() {
|
||||
runBlocking {
|
||||
userService.createUser(username = "hubert", hashedPassword = "password", email = "a@a") `should be` null
|
||||
userService.create(username = "hubert", hashedPassword = "password") `should be` null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,12 +60,11 @@ class UserServiceTest {
|
||||
@Order(3)
|
||||
fun `test delete user`() {
|
||||
runBlocking {
|
||||
val email = "a@a"
|
||||
val id = userService.getUserId(email)!!
|
||||
userService.deleteUser(id)
|
||||
val id = userService.find("hubert")!!.id
|
||||
userService.delete(id)
|
||||
|
||||
userService.getUserId(email) `should be` null
|
||||
userService.getUserInfo(id) `should be` null
|
||||
userService.find("hubert") `should be` null
|
||||
userService.find(id) `should be` null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user