Skip to content

Commit

Permalink
Push works
Browse files Browse the repository at this point in the history
  • Loading branch information
cheroliv committed Oct 22, 2024
1 parent 1c66d4a commit f9eea4f
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions api/src/test/kotlin/school/users/UserDaoTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ import school.tdd.TestUtils.defaultRoles
import school.users.User.UserDao
import school.users.User.UserDao.Dao.countUsers
import school.users.User.UserDao.Dao.deleteAllUsersOnly
//import school.users.User.UserDao.Dao.findAuthsByEmail
//import school.users.User.UserDao.Dao.findAuthsByLogin
import school.users.User.UserDao.Dao.findOne
import school.users.User.UserDao.Dao.findOneByEmail
import school.users.User.UserDao.Dao.findOneWithAuths
//import school.users.User.UserDao.Dao.findUserById
import school.users.User.UserDao.Dao.save
import school.users.User.UserDao.Dao.signup
import school.users.User.UserDao.Relations.FIND_USER_BY_LOGIN
Expand Down Expand Up @@ -98,7 +95,6 @@ class UserDaoTests {
"""
}

@Ignore
@Test
fun `test findOneWithAuths with one query using h2 database`(): Unit = runBlocking {
assertEquals(0, context.countUsers())
Expand Down Expand Up @@ -132,10 +128,6 @@ class UserDaoTests {
val userResult = context
.findOneWithAuths<User>(user.login)
.getOrNull()
.apply {
run { "context.findOneWithAuths<User>(user.login).getOrNull() : $this" }
.run(::println)
}
assertNotNull(expectedUserResult)
assertNotNull(expectedUserResult.id)
assertTrue(expectedUserResult.roles.isNotEmpty())
Expand All @@ -148,8 +140,6 @@ class UserDaoTests {
userResult
)
}
// .run(::println)

}

@Ignore
Expand Down Expand Up @@ -323,7 +313,6 @@ class UserDaoTests {
assertEquals(1, context.countUserAuthority())
}

@Ignore
@Test
fun `try to do implementation of findOneWithAuths with existing email login and roles using composed query`(): Unit =
runBlocking {
Expand All @@ -348,7 +337,6 @@ class UserDaoTests {
assertEquals(1, context.countUserAuthority())
}

@Ignore
@Test
fun `try to do implementation of findOneWithAuths with existing email login and roles`(): Unit = runBlocking {
val countUserBefore = context.countUsers()
Expand Down Expand Up @@ -390,7 +378,6 @@ class UserDaoTests {
assertEquals(1, context.countUserAuthority())
}

@Ignore
@Test
fun `test signup and trying to retrieve the user id from databaseClient object`(): Unit = runBlocking {
assertEquals(0, context.countUsers())
Expand All @@ -409,7 +396,6 @@ class UserDaoTests {
}
}

@Ignore
@Test
fun `test UserRoleDao signup with existing user without user_role`(): Unit = runBlocking {
val countUserBefore = context.countUsers()
Expand Down Expand Up @@ -449,7 +435,6 @@ class UserDaoTests {
}


@Ignore
@Test
fun `check findOneByEmail with non-existent email`(): Unit = runBlocking {
assertEquals(
Expand All @@ -464,7 +449,6 @@ class UserDaoTests {
}


@Ignore
@Test
fun `check findOneByEmail with existant email`(): Unit = runBlocking {
assertEquals(
Expand All @@ -484,7 +468,6 @@ class UserDaoTests {
}.map { assertDoesNotThrow { fromString(it.toString()) } }
}

@Ignore
@Test
fun `test findOne with not existing email or login`(): Unit = runBlocking {
assertEquals(0, context.countUsers())
Expand All @@ -498,15 +481,13 @@ class UserDaoTests {
}
}

@Ignore
@Test
fun `save default user should work in this context `(): Unit = runBlocking {
val count = context.countUsers()
(user to context).save()
assertEquals(expected = count + 1, context.countUsers())
}

@Ignore
@Test
fun `test retrieve id from user by existing login`(): Unit = runBlocking {
val countUserBefore = context.countUsers()
Expand All @@ -528,7 +509,6 @@ class UserDaoTests {
}
}

@Ignore
@Test
fun `count users, expected 0`(): Unit = runBlocking {
assertEquals(
Expand All @@ -539,7 +519,6 @@ class UserDaoTests {
}

//TODO: move this test RoleDaoTests
@Ignore
@Test
fun `count roles, expected 3`(): Unit = runBlocking {
context.run {
Expand Down

0 comments on commit f9eea4f

Please sign in to comment.