From 35d957567c56fce5aeb92a9593763cc0707c8eb0 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:43:27 +0900 Subject: [PATCH] =?UTF-8?q?test:=20rejectFollowRequest=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RelationshipServiceImplTest.kt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/test/kotlin/dev/usbharu/hideout/core/service/relationship/RelationshipServiceImplTest.kt b/src/test/kotlin/dev/usbharu/hideout/core/service/relationship/RelationshipServiceImplTest.kt index 0389b895..be2fca26 100644 --- a/src/test/kotlin/dev/usbharu/hideout/core/service/relationship/RelationshipServiceImplTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/core/service/relationship/RelationshipServiceImplTest.kt @@ -412,10 +412,10 @@ class RelationshipServiceImplTest { fun `rejectFollowRequest ローカルユーザーの場合永続化される`() = runTest { whenever(userQueryService.findById(eq(5678))).doReturn(UserBuilder.localUserOf(domain = "example.com")) - whenever(relationshipRepository.findByUserIdAndTargetUserId(eq(1234), eq(5678))).doReturn( + whenever(relationshipRepository.findByUserIdAndTargetUserId(eq(5678), eq(1234))).doReturn( Relationship( - userId = 1234, - targetUserId = 5678, + userId = 5678, + targetUserId = 1234, following = false, blocking = false, muting = false, @@ -429,8 +429,8 @@ class RelationshipServiceImplTest { verify(relationshipRepository, times(1)).save( eq( Relationship( - userId = 1234, - targetUserId = 5678, + userId = 5678, + targetUserId = 1234, following = false, blocking = false, muting = false, @@ -451,10 +451,10 @@ class RelationshipServiceImplTest { val remoteUser = UserBuilder.remoteUserOf(domain = "remote.example.com") whenever(userQueryService.findById(eq(5678))).doReturn(remoteUser) - whenever(relationshipRepository.findByUserIdAndTargetUserId(eq(1234), eq(5678))).doReturn( + whenever(relationshipRepository.findByUserIdAndTargetUserId(eq(5678), eq(1234))).doReturn( Relationship( - userId = 1234, - targetUserId = 5678, + userId = 5678, + targetUserId = 1234, following = false, blocking = false, muting = false, @@ -468,8 +468,8 @@ class RelationshipServiceImplTest { verify(relationshipRepository, times(1)).save( eq( Relationship( - userId = 1234, - targetUserId = 5678, + userId = 5678, + targetUserId = 1234, following = false, blocking = false, muting = false, @@ -492,10 +492,10 @@ class RelationshipServiceImplTest { @Test fun `rejectFollowRequest フォローリクエストが存在しない場合何もしない`() = runTest { - whenever(relationshipRepository.findByUserIdAndTargetUserId(eq(1234), eq(5678))).doReturn( + whenever(relationshipRepository.findByUserIdAndTargetUserId(eq(5678), eq(1234))).doReturn( Relationship( - userId = 1234, - targetUserId = 5678, + userId = 5678, + targetUserId = 1234, following = false, blocking = false, muting = false,