mirror of https://github.com/usbharu/Hideout.git
style: スタイルを修正
This commit is contained in:
parent
d141b60ab2
commit
d856de526a
|
@ -6,6 +6,6 @@ exposed_version=0.41.1
|
|||
h2_version=2.1.214
|
||||
koin_version=3.3.1
|
||||
org.gradle.parallel=true
|
||||
#org.gradle.configureondemand=true
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.caching=true
|
||||
org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC
|
||||
|
|
|
@ -30,7 +30,8 @@ class UndoTest {
|
|||
|
||||
@Test
|
||||
fun Undoをデシリアライズ出来る() {
|
||||
@Language("JSON") val json = """
|
||||
@Language("JSON")
|
||||
val json = """
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
|
|
|
@ -92,6 +92,18 @@ class ActivityPubKtTest {
|
|||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun addFollowRequest(id: Long, follower: Long) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun deleteFollowRequest(id: Long, follower: Long) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun findFollowRequestsById(id: Long, follower: Long): Boolean {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun nextId(): Long {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
|
|
@ -41,11 +41,14 @@ class JwtRefreshTokenRepositoryImplTest {
|
|||
|
||||
@Test
|
||||
fun `save 存在しない場合はinsertする`() = runTest {
|
||||
val repository = JwtRefreshTokenRepositoryImpl(db, object : IdGenerateService {
|
||||
val repository = JwtRefreshTokenRepositoryImpl(
|
||||
db,
|
||||
object : IdGenerateService {
|
||||
override suspend fun generateId(): Long {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
val now = Instant.now(Clock.tickMillis(ZoneId.systemDefault()))
|
||||
val expiresAt = now.plus(10, ChronoUnit.MINUTES)
|
||||
|
||||
|
@ -57,11 +60,14 @@ class JwtRefreshTokenRepositoryImplTest {
|
|||
|
||||
@Test
|
||||
fun `save 存在する場合はupdateする`() = runTest {
|
||||
val repository = JwtRefreshTokenRepositoryImpl(db, object : IdGenerateService {
|
||||
val repository = JwtRefreshTokenRepositoryImpl(
|
||||
db,
|
||||
object : IdGenerateService {
|
||||
override suspend fun generateId(): Long {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
transaction {
|
||||
JwtRefreshTokens.insert {
|
||||
it[id] = 1L
|
||||
|
|
|
@ -158,8 +158,12 @@ class PostsTest {
|
|||
config = ApplicationConfig("empty.conf")
|
||||
}
|
||||
val post = Post(
|
||||
12345, 1234, text = "aaa", visibility = Visibility.PUBLIC,
|
||||
createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1"
|
||||
12345,
|
||||
1234,
|
||||
text = "aaa",
|
||||
visibility = Visibility.PUBLIC,
|
||||
createdAt = Instant.now().toEpochMilli(),
|
||||
url = "https://example.com/posts/1"
|
||||
)
|
||||
val postService = mock<IPostService> {
|
||||
onBlocking { findByIdForUser(any(), anyOrNull()) } doReturn post
|
||||
|
@ -185,8 +189,12 @@ class PostsTest {
|
|||
config = ApplicationConfig("empty.conf")
|
||||
}
|
||||
val post = Post(
|
||||
12345, 1234, text = "aaa", visibility = Visibility.FOLLOWERS,
|
||||
createdAt = Instant.now().toEpochMilli(), url = "https://example.com/posts/1"
|
||||
12345,
|
||||
1234,
|
||||
text = "aaa",
|
||||
visibility = Visibility.FOLLOWERS,
|
||||
createdAt = Instant.now().toEpochMilli(),
|
||||
url = "https://example.com/posts/1"
|
||||
)
|
||||
val postService = mock<IPostService> {
|
||||
onBlocking { findByIdForUser(any(), isNotNull()) } doReturn post
|
||||
|
@ -247,7 +255,6 @@ class PostsTest {
|
|||
}
|
||||
application {
|
||||
authentication {
|
||||
|
||||
bearer(TOKEN_AUTH) {
|
||||
authenticate {
|
||||
println("aaaaaaaaaaaa")
|
||||
|
|
|
@ -290,7 +290,8 @@ class UsersTest {
|
|||
"test User",
|
||||
"https://example.com/test",
|
||||
Instant.now().toEpochMilli()
|
||||
), UserResponse(
|
||||
),
|
||||
UserResponse(
|
||||
1236,
|
||||
"follower2",
|
||||
"example.com",
|
||||
|
@ -334,7 +335,8 @@ class UsersTest {
|
|||
"test User",
|
||||
"https://example.com/test",
|
||||
Instant.now().toEpochMilli()
|
||||
), UserResponse(
|
||||
),
|
||||
UserResponse(
|
||||
1236,
|
||||
"follower2",
|
||||
"example.com",
|
||||
|
@ -378,7 +380,8 @@ class UsersTest {
|
|||
"test User",
|
||||
"https://example.com/test",
|
||||
Instant.now().toEpochMilli()
|
||||
), UserResponse(
|
||||
),
|
||||
UserResponse(
|
||||
1236,
|
||||
"follower2",
|
||||
"example.com",
|
||||
|
@ -572,7 +575,8 @@ class UsersTest {
|
|||
"test User",
|
||||
"https://example.com/test",
|
||||
Instant.now().toEpochMilli()
|
||||
), UserResponse(
|
||||
),
|
||||
UserResponse(
|
||||
1236,
|
||||
"follower2",
|
||||
"example.com",
|
||||
|
@ -616,7 +620,8 @@ class UsersTest {
|
|||
"test User",
|
||||
"https://example.com/test",
|
||||
Instant.now().toEpochMilli()
|
||||
), UserResponse(
|
||||
),
|
||||
UserResponse(
|
||||
1236,
|
||||
"follower2",
|
||||
"example.com",
|
||||
|
@ -660,7 +665,8 @@ class UsersTest {
|
|||
"test User",
|
||||
"https://example.com/test",
|
||||
Instant.now().toEpochMilli()
|
||||
), UserResponse(
|
||||
),
|
||||
UserResponse(
|
||||
1236,
|
||||
"follower2",
|
||||
"example.com",
|
||||
|
|
|
@ -37,7 +37,6 @@ class MetaServiceImplTest {
|
|||
|
||||
@Test
|
||||
fun `updateMeta メタデータを保存できる`() = runTest {
|
||||
|
||||
val meta = Meta("1.0.1", Jwt(UUID.randomUUID(), "sdfsdjk", "adafda"))
|
||||
val metaRepository = mock<IMetaRepository> {
|
||||
onBlocking { save(any()) } doReturn Unit
|
||||
|
|
Loading…
Reference in New Issue