mirror of https://github.com/usbharu/Hideout.git
feat: 不要なコンフィグを削除
This commit is contained in:
parent
004aad7dea
commit
e869fad11d
|
@ -1,8 +1,5 @@
|
|||
package dev.usbharu.hideout.config
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
|
||||
@Deprecated("Config is deprecated")
|
||||
object Config {
|
||||
var configData: ConfigData = ConfigData()
|
||||
|
@ -12,6 +9,5 @@ object Config {
|
|||
data class ConfigData(
|
||||
val url: String = "",
|
||||
val domain: String = url.substringAfter("://").substringBeforeLast(":"),
|
||||
val objectMapper: ObjectMapper = jacksonObjectMapper(),
|
||||
val characterLimit: CharacterLimit = CharacterLimit()
|
||||
)
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.junit.jupiter.api.Test
|
|||
import org.mockito.Mockito.anyLong
|
||||
import org.mockito.Mockito.eq
|
||||
import org.mockito.kotlin.*
|
||||
import utils.JsonObjectMapper
|
||||
import utils.JsonObjectMapper.objectMapper
|
||||
import utils.TestApplicationConfig.testApplicationConfig
|
||||
import java.time.Instant
|
||||
|
@ -123,7 +122,7 @@ class APNoteServiceImplTest {
|
|||
val mediaQueryService = mock<MediaQueryService> {
|
||||
onBlocking { findByPostId(anyLong()) } doReturn emptyList()
|
||||
}
|
||||
Config.configData = ConfigData(objectMapper = JsonObjectMapper.objectMapper)
|
||||
Config.configData = ConfigData()
|
||||
val httpClient = HttpClient(
|
||||
MockEngine { httpRequestData ->
|
||||
assertEquals("https://follower.example.com/inbox", httpRequestData.url.toString())
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
|
|||
import org.junit.jupiter.api.Test
|
||||
import org.mockito.ArgumentMatchers.anyString
|
||||
import org.mockito.kotlin.*
|
||||
import utils.JsonObjectMapper
|
||||
import utils.JsonObjectMapper.objectMapper
|
||||
import utils.TestTransaction
|
||||
import java.time.Instant
|
||||
|
@ -80,7 +79,7 @@ class APReceiveFollowServiceImplTest {
|
|||
|
||||
@Test
|
||||
fun `receiveFollowJob フォロー受付処理のJob`() = runTest {
|
||||
Config.configData = ConfigData(objectMapper = JsonObjectMapper.objectMapper)
|
||||
Config.configData = ConfigData()
|
||||
val person = Person(
|
||||
type = emptyList(),
|
||||
name = "follower",
|
||||
|
|
Loading…
Reference in New Issue