mirror of https://github.com/usbharu/Hideout.git
test: テストを修正
This commit is contained in:
parent
37db201f87
commit
d163fc0948
|
@ -111,6 +111,5 @@ class ActivityPubUserServiceImpl(
|
|||
)
|
||||
person
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.junit.jupiter.api.Test
|
|||
import org.mockito.kotlin.any
|
||||
import org.mockito.kotlin.doAnswer
|
||||
import org.mockito.kotlin.mock
|
||||
import utils.TestTransaction
|
||||
import java.security.KeyPairGenerator
|
||||
import java.time.Instant
|
||||
|
||||
|
@ -40,7 +41,7 @@ class ActivityPubKtTest {
|
|||
}
|
||||
}
|
||||
runBlocking {
|
||||
val ktorKeyMap = KtorKeyMap(userQueryService)
|
||||
val ktorKeyMap = KtorKeyMap(userQueryService, TestTransaction)
|
||||
|
||||
val httpClient = HttpClient(
|
||||
MockEngine { httpRequestData ->
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.junit.jupiter.api.Test
|
|||
import org.mockito.kotlin.any
|
||||
import org.mockito.kotlin.doAnswer
|
||||
import org.mockito.kotlin.mock
|
||||
import utils.TestTransaction
|
||||
import java.security.KeyPairGenerator
|
||||
import java.time.Instant
|
||||
|
||||
|
@ -35,7 +36,7 @@ class KtorKeyMapTest {
|
|||
)
|
||||
}
|
||||
}
|
||||
val ktorKeyMap = KtorKeyMap(userQueryService)
|
||||
val ktorKeyMap = KtorKeyMap(userQueryService, TestTransaction)
|
||||
|
||||
ktorKeyMap.getPrivateKey("test")
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test
|
|||
import org.mockito.ArgumentMatchers.anyString
|
||||
import org.mockito.kotlin.*
|
||||
import utils.JsonObjectMapper
|
||||
import utils.TestTransaction
|
||||
import java.time.Instant
|
||||
|
||||
class ActivityPubReceiveFollowServiceImplTest {
|
||||
|
@ -33,7 +34,7 @@ class ActivityPubReceiveFollowServiceImplTest {
|
|||
onBlocking { schedule(eq(ReceiveFollowJob), any()) } doReturn Unit
|
||||
}
|
||||
val activityPubFollowService =
|
||||
ActivityPubReceiveFollowServiceImpl(jobQueueParentService, mock(), mock(), mock(), mock())
|
||||
ActivityPubReceiveFollowServiceImpl(jobQueueParentService, mock(), mock(), mock(), mock(), TestTransaction)
|
||||
activityPubFollowService.receiveFollow(
|
||||
Follow(
|
||||
emptyList(),
|
||||
|
@ -161,7 +162,8 @@ class ActivityPubReceiveFollowServiceImplTest {
|
|||
respondOk()
|
||||
}
|
||||
),
|
||||
userQueryService
|
||||
userQueryService,
|
||||
TestTransaction
|
||||
)
|
||||
activityPubFollowService.receiveFollowJob(
|
||||
JobProps(
|
||||
|
|
Loading…
Reference in New Issue