mirror of https://github.com/usbharu/Hideout.git
test: テストを修正
This commit is contained in:
parent
4985af4291
commit
16fd6a017e
|
@ -4,6 +4,7 @@ import com.auth0.jwt.interfaces.Claim
|
||||||
import com.auth0.jwt.interfaces.Payload
|
import com.auth0.jwt.interfaces.Payload
|
||||||
import com.fasterxml.jackson.module.kotlin.readValue
|
import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import dev.usbharu.hideout.config.Config
|
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.dto.UserResponse
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
||||||
import dev.usbharu.hideout.domain.model.hideout.form.UserCreate
|
import dev.usbharu.hideout.domain.model.hideout.form.UserCreate
|
||||||
|
@ -433,9 +434,7 @@ class UsersTest {
|
||||||
"https://example.com/test",
|
"https://example.com/test",
|
||||||
Instant.now().toEpochMilli()
|
Instant.now().toEpochMilli()
|
||||||
)
|
)
|
||||||
}
|
onBlocking { follow(any<Acct>(), eq(1234)) } doReturn true
|
||||||
val userService = mock<UserService> {
|
|
||||||
onBlocking { followRequest(eq(1235), eq(1234)) } doReturn true
|
|
||||||
}
|
}
|
||||||
application {
|
application {
|
||||||
configureSerialization()
|
configureSerialization()
|
||||||
|
@ -448,7 +447,7 @@ class UsersTest {
|
||||||
}
|
}
|
||||||
routing {
|
routing {
|
||||||
route("/api/internal/v1") {
|
route("/api/internal/v1") {
|
||||||
users(userService, userApiService)
|
users(mock(), userApiService)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -483,9 +482,7 @@ class UsersTest {
|
||||||
"https://example.com/test",
|
"https://example.com/test",
|
||||||
Instant.now().toEpochMilli()
|
Instant.now().toEpochMilli()
|
||||||
)
|
)
|
||||||
}
|
onBlocking { follow(any<Acct>(), eq(1234)) } doReturn false
|
||||||
val userService = mock<UserService> {
|
|
||||||
onBlocking { followRequest(eq(1235), eq(1234)) } doReturn false
|
|
||||||
}
|
}
|
||||||
application {
|
application {
|
||||||
configureSerialization()
|
configureSerialization()
|
||||||
|
@ -498,7 +495,7 @@ class UsersTest {
|
||||||
}
|
}
|
||||||
routing {
|
routing {
|
||||||
route("/api/internal/v1") {
|
route("/api/internal/v1") {
|
||||||
users(userService, userApiService)
|
users(mock(), userApiService)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -533,9 +530,7 @@ class UsersTest {
|
||||||
"https://example.com/test",
|
"https://example.com/test",
|
||||||
Instant.now().toEpochMilli()
|
Instant.now().toEpochMilli()
|
||||||
)
|
)
|
||||||
}
|
onBlocking { follow(eq(1235), eq(1234)) } doReturn false
|
||||||
val userService = mock<UserService> {
|
|
||||||
onBlocking { followRequest(eq(1235), eq(1234)) } doReturn false
|
|
||||||
}
|
}
|
||||||
application {
|
application {
|
||||||
configureSerialization()
|
configureSerialization()
|
||||||
|
@ -548,7 +543,7 @@ class UsersTest {
|
||||||
}
|
}
|
||||||
routing {
|
routing {
|
||||||
route("/api/internal/v1") {
|
route("/api/internal/v1") {
|
||||||
users(userService, userApiService)
|
users(mock(), userApiService)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue