From ae166f7bce6b949c55dd026a06916468b28e6f71 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Fri, 21 Apr 2023 22:16:58 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=E6=94=B9=E8=A1=8C=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activitypub/ActivityPubNoteServiceImplTest.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubNoteServiceImplTest.kt b/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubNoteServiceImplTest.kt index 0c44a9f7..8d820be6 100644 --- a/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubNoteServiceImplTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/service/activitypub/ActivityPubNoteServiceImplTest.kt @@ -66,7 +66,7 @@ class ActivityPubNoteServiceImplTest { 1L, 1L, null, "test text", 1L, 1, "https://example.com" ) activityPubNoteService.createNote(postEntity) - verify(jobQueueParentService,times(2)).schedule(eq(DeliverPostJob), any()) + verify(jobQueueParentService, times(2)).schedule(eq(DeliverPostJob), any()) } @Test @@ -76,12 +76,13 @@ class ActivityPubNoteServiceImplTest { assertEquals("https://follower.example.com/inbox", httpRequestData.url.toString()) respondOk() }) - val activityPubNoteService = ActivityPubNoteServiceImpl(httpClient,mock(),mock()) + val activityPubNoteService = ActivityPubNoteServiceImpl(httpClient, mock(), mock()) activityPubNoteService.createNoteJob( JobProps( - data = mapOf( + data = mapOf( DeliverPostJob.actor.name to "https://follower.example.com", - DeliverPostJob.post.name to "{\"id\":\"https://example.com\",\"type\":\"Note\",\"attributedTo\":\"https://example.com\",\"content\":\"test text\",\"to\":[\"https://www.w3.org/ns/activitystreams#Public\"],\"cc\":[\"https://example.com/followers\"],\"published\":\"2021-01-01T00:00:00.000Z\",\"url\":\"https://example.com\"}", + DeliverPostJob.post.name to "{\"id\":1,\"userId\":1,\"inReplyToId\":null,\"text\":\"test text\"," + + "\"createdAt\":1,\"updatedAt\":1,\"url\":\"https://example.com\"}", DeliverPostJob.inbox.name to "https://follower.example.com/inbox" ), json = Json