From 16fd6a017e0601b536d9c1db74953271006928b7 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Tue, 15 Aug 2023 01:42:28 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routing/api/internal/v1/UsersTest.kt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt index 18f70364..82a72db4 100644 --- a/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt +++ b/src/test/kotlin/dev/usbharu/hideout/routing/api/internal/v1/UsersTest.kt @@ -4,6 +4,7 @@ import com.auth0.jwt.interfaces.Claim import com.auth0.jwt.interfaces.Payload import com.fasterxml.jackson.module.kotlin.readValue import dev.usbharu.hideout.config.Config +import dev.usbharu.hideout.domain.model.Acct import dev.usbharu.hideout.domain.model.hideout.dto.UserResponse import dev.usbharu.hideout.domain.model.hideout.entity.User import dev.usbharu.hideout.domain.model.hideout.form.UserCreate @@ -433,9 +434,7 @@ class UsersTest { "https://example.com/test", Instant.now().toEpochMilli() ) - } - val userService = mock { - onBlocking { followRequest(eq(1235), eq(1234)) } doReturn true + onBlocking { follow(any(), eq(1234)) } doReturn true } application { configureSerialization() @@ -448,7 +447,7 @@ class UsersTest { } routing { route("/api/internal/v1") { - users(userService, userApiService) + users(mock(), userApiService) } } } @@ -483,9 +482,7 @@ class UsersTest { "https://example.com/test", Instant.now().toEpochMilli() ) - } - val userService = mock { - onBlocking { followRequest(eq(1235), eq(1234)) } doReturn false + onBlocking { follow(any(), eq(1234)) } doReturn false } application { configureSerialization() @@ -498,7 +495,7 @@ class UsersTest { } routing { route("/api/internal/v1") { - users(userService, userApiService) + users(mock(), userApiService) } } } @@ -533,9 +530,7 @@ class UsersTest { "https://example.com/test", Instant.now().toEpochMilli() ) - } - val userService = mock { - onBlocking { followRequest(eq(1235), eq(1234)) } doReturn false + onBlocking { follow(eq(1235), eq(1234)) } doReturn false } application { configureSerialization() @@ -548,7 +543,7 @@ class UsersTest { } routing { route("/api/internal/v1") { - users(userService, userApiService) + users(mock(), userApiService) } } }