From a559afc38093366e5ab99de48dc097c492711a8c Mon Sep 17 00:00:00 2001 From: takapi327 Date: Fri, 20 Oct 2023 23:26:23 +0900 Subject: [PATCH] Fix TableQueryBuilderTest --- .../core/builder/TableQueryBuilderTest.scala | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/core/src/test/scala/ldbc/core/builder/TableQueryBuilderTest.scala b/core/src/test/scala/ldbc/core/builder/TableQueryBuilderTest.scala index e58c44236..da7241661 100644 --- a/core/src/test/scala/ldbc/core/builder/TableQueryBuilderTest.scala +++ b/core/src/test/scala/ldbc/core/builder/TableQueryBuilderTest.scala @@ -322,26 +322,6 @@ object TableQueryBuilderTest extends Specification: |""".stripMargin } - "IllegalArgumentException is raised if the type of the column set in FOREIGN KEY does not match." in { - case class Test(id: Long, subId: Long) - case class SubTest(id: Long, test: String) - - val subTable: Table[SubTest] = Table[SubTest]("sub_test")( - column("id", BIGINT(64), AUTO_INCREMENT, PRIMARY_KEY), - column("test", VARCHAR(64)) - ) - - val table: Table[Test] = Table[Test]("test")( - column("id", BIGINT(64), AUTO_INCREMENT), - column("sub_id", BIGINT(64)) - ) - .keySet(table => PRIMARY_KEY(table.id)) - .keySet(table => INDEX_KEY(table.subId)) - .keySet(table => CONSTRAINT("fk_id", FOREIGN_KEY(table.subId, REFERENCE(subTable, subTable.test)))) - - TableQueryBuilder(table) must throwAn[IllegalArgumentException] - } - "If a column that is not a PRIMARY KEY is set as a FOREIGN KEY, an IllegalArgumentException will be thrown." in { case class Test(id: Long, subId: Long) case class SubTest(id: Long, test: Long)