test: テストを修正

This commit is contained in:
usbharu 2023-11-03 14:11:14 +09:00
parent 31a3bfd714
commit 00d24b5030
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package dev.usbharu.hideout.application.config
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonSetter
import com.fasterxml.jackson.annotation.Nulls
import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
@ -25,6 +26,9 @@ class ActivityPubConfig {
.setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
.setDefaultSetterInfo(JsonSetter.Value.forContentNulls(Nulls.AS_EMPTY))
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(JsonParser.Feature.ALLOW_COMMENTS, true)
.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true)
.configure(JsonParser.Feature.ALLOW_TRAILING_COMMA, true)
return objectMapper
}

View File

@ -70,8 +70,8 @@ class APReceiveFollowServiceImplTest {
"type": "Follow",
"name": "Follow",
"actor": "https://follower.example.com",
"object": "https://example.com",
"@context": null
"object": "https://example.com"
}"""
),
Json.parseToJsonElement(follow)