mirror of https://github.com/usbharu/Hideout.git
test: テストの前提条件SQLをコードから安全に生成できるように
This commit is contained in:
parent
e67eb788a7
commit
1983841cef
|
@ -40,18 +40,7 @@ class ExposedActorInstanceRelationshipRepositoryTest : AbstractRepositoryTest(Ac
|
|||
execute(Operations.sql("SET REFERENTIAL_INTEGRITY FALSE"))
|
||||
insertInto(Instance.tableName) {
|
||||
columns(
|
||||
"ID",
|
||||
"name",
|
||||
"DESCRIPTION",
|
||||
"URL",
|
||||
"ICON_URL",
|
||||
"SHARED_INBOX",
|
||||
"SOFTWARE",
|
||||
"VERSION",
|
||||
"IS_BLOCKED",
|
||||
"IS_MUTED",
|
||||
"MODERATION_NOTE",
|
||||
"CREATED_AT"
|
||||
Instance.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
@ -70,33 +59,7 @@ class ExposedActorInstanceRelationshipRepositoryTest : AbstractRepositoryTest(Ac
|
|||
}
|
||||
insertInto("public.actors") {
|
||||
columns(
|
||||
"id",
|
||||
"name",
|
||||
"domain",
|
||||
"screen_name",
|
||||
"description",
|
||||
"inbox",
|
||||
"outbox",
|
||||
"url",
|
||||
"public_key",
|
||||
"private_key",
|
||||
"created_at",
|
||||
"key_id",
|
||||
"following",
|
||||
"followers",
|
||||
"instance",
|
||||
"locked",
|
||||
"following_count",
|
||||
"followers_count",
|
||||
"posts_count",
|
||||
"last_post_at",
|
||||
"last_update_at",
|
||||
"suspend",
|
||||
"move_to",
|
||||
"emojis",
|
||||
"deleted",
|
||||
"icon",
|
||||
"banner"
|
||||
Actors.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
@ -153,18 +116,7 @@ class ExposedActorInstanceRelationshipRepositoryTest : AbstractRepositoryTest(Ac
|
|||
execute(Operations.sql("SET REFERENTIAL_INTEGRITY FALSE"))
|
||||
insertInto(Instance.tableName) {
|
||||
columns(
|
||||
"ID",
|
||||
"name",
|
||||
"DESCRIPTION",
|
||||
"URL",
|
||||
"ICON_URL",
|
||||
"SHARED_INBOX",
|
||||
"SOFTWARE",
|
||||
"VERSION",
|
||||
"IS_BLOCKED",
|
||||
"IS_MUTED",
|
||||
"MODERATION_NOTE",
|
||||
"CREATED_AT"
|
||||
Instance.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
@ -183,33 +135,7 @@ class ExposedActorInstanceRelationshipRepositoryTest : AbstractRepositoryTest(Ac
|
|||
}
|
||||
insertInto("public.actors") {
|
||||
columns(
|
||||
"id",
|
||||
"name",
|
||||
"domain",
|
||||
"screen_name",
|
||||
"description",
|
||||
"inbox",
|
||||
"outbox",
|
||||
"url",
|
||||
"public_key",
|
||||
"private_key",
|
||||
"created_at",
|
||||
"key_id",
|
||||
"following",
|
||||
"followers",
|
||||
"instance",
|
||||
"locked",
|
||||
"following_count",
|
||||
"followers_count",
|
||||
"posts_count",
|
||||
"last_post_at",
|
||||
"last_update_at",
|
||||
"suspend",
|
||||
"move_to",
|
||||
"emojis",
|
||||
"deleted",
|
||||
"icon",
|
||||
"banner"
|
||||
Actors.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.assertj.db.api.Assertions.assertThat
|
|||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
import utils.AbstractRepositoryTest
|
||||
import utils.columns
|
||||
import utils.isEqualTo
|
||||
import utils.value
|
||||
import java.net.URI
|
||||
|
@ -56,18 +57,7 @@ class InstanceRepositoryImplTest : AbstractRepositoryTest(InstanceTable) {
|
|||
dbSetup(to = dataSource) {
|
||||
insertInto(InstanceTable.tableName) {
|
||||
columns(
|
||||
"ID",
|
||||
"name",
|
||||
"DESCRIPTION",
|
||||
"URL",
|
||||
"ICON_URL",
|
||||
"SHARED_INBOX",
|
||||
"SOFTWARE",
|
||||
"VERSION",
|
||||
"IS_BLOCKED",
|
||||
"IS_MUTED",
|
||||
"MODERATION_NOTE",
|
||||
"CREATED_AT"
|
||||
InstanceTable.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
@ -119,18 +109,7 @@ class InstanceRepositoryImplTest : AbstractRepositoryTest(InstanceTable) {
|
|||
dbSetup(to = dataSource) {
|
||||
insertInto(InstanceTable.tableName) {
|
||||
columns(
|
||||
"ID",
|
||||
"name",
|
||||
"DESCRIPTION",
|
||||
"URL",
|
||||
"ICON_URL",
|
||||
"SHARED_INBOX",
|
||||
"SOFTWARE",
|
||||
"VERSION",
|
||||
"IS_BLOCKED",
|
||||
"IS_MUTED",
|
||||
"MODERATION_NOTE",
|
||||
"CREATED_AT"
|
||||
InstanceTable.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
@ -178,18 +157,7 @@ class InstanceRepositoryImplTest : AbstractRepositoryTest(InstanceTable) {
|
|||
dbSetup(to = dataSource) {
|
||||
insertInto(InstanceTable.tableName) {
|
||||
columns(
|
||||
"ID",
|
||||
"name",
|
||||
"DESCRIPTION",
|
||||
"URL",
|
||||
"ICON_URL",
|
||||
"SHARED_INBOX",
|
||||
"SOFTWARE",
|
||||
"VERSION",
|
||||
"IS_BLOCKED",
|
||||
"IS_MUTED",
|
||||
"MODERATION_NOTE",
|
||||
"CREATED_AT"
|
||||
InstanceTable.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
@ -237,18 +205,7 @@ class InstanceRepositoryImplTest : AbstractRepositoryTest(InstanceTable) {
|
|||
dbSetup(to = dataSource) {
|
||||
insertInto(InstanceTable.tableName) {
|
||||
columns(
|
||||
"ID",
|
||||
"name",
|
||||
"DESCRIPTION",
|
||||
"URL",
|
||||
"ICON_URL",
|
||||
"SHARED_INBOX",
|
||||
"SOFTWARE",
|
||||
"VERSION",
|
||||
"IS_BLOCKED",
|
||||
"IS_MUTED",
|
||||
"MODERATION_NOTE",
|
||||
"CREATED_AT"
|
||||
InstanceTable.columns
|
||||
)
|
||||
values(
|
||||
1,
|
||||
|
|
Loading…
Reference in New Issue