diff --git a/spra-play-server/src/test/scala/net/wiringbits/spra/admin/QueryBuilderSpec.scala b/spra-play-server/src/test/scala/net/wiringbits/spra/admin/QueryBuilderSpec.scala index 7f53bfc..66f12c0 100644 --- a/spra-play-server/src/test/scala/net/wiringbits/spra/admin/QueryBuilderSpec.scala +++ b/spra-play-server/src/test/scala/net/wiringbits/spra/admin/QueryBuilderSpec.scala @@ -1,5 +1,6 @@ package net.wiringbits.spra.admin +import net.wiringbits.spra.admin.models.ColumnType import net.wiringbits.spra.admin.repositories.models.TableColumn import net.wiringbits.spra.admin.utils.QueryBuilder import org.scalatest.matchers.must.Matchers.{be, must} @@ -20,7 +21,10 @@ class QueryBuilderSpec extends AnyWordSpec { |""".stripMargin val tableName = "users" val body = - Map(TableColumn("email", "citext") -> "wiringbits@wiringbits.net", TableColumn("name", "text") -> "wiringbits") + Map( + TableColumn("email", ColumnType.parseColumnType("citext")) -> "wiringbits@wiringbits.net", + TableColumn("name", ColumnType.parseColumnType("text")) -> "wiringbits" + ) val primaryKeyField = "user_id" val response = QueryBuilder.create(tableName, body, primaryKeyField) @@ -58,8 +62,8 @@ class QueryBuilderSpec extends AnyWordSpec { |""".stripMargin val tableName = "users" val body = Map( - TableColumn("email", "citext") -> "wiringbits@wiringbits.net", - TableColumn("name", "text") -> "wiringbits@wiringbits.net" + TableColumn("email", ColumnType.parseColumnType("citext")) -> "wiringbits@wiringbits.net", + TableColumn("name", ColumnType.parseColumnType("text")) -> "wiringbits@wiringbits.net" ) val primaryKeyField = "user_id" @@ -76,9 +80,9 @@ class QueryBuilderSpec extends AnyWordSpec { |""".stripMargin val tableName = "users" val body = Map( - TableColumn("email", "citext") -> "wiringbits@wiringbits.net", - TableColumn("name", "text") -> "wiringbits@wiringbits.net", - TableColumn("phone_number", "text") -> "null" + TableColumn("email", ColumnType.parseColumnType("citext")) -> "wiringbits@wiringbits.net", + TableColumn("name", ColumnType.parseColumnType("text")) -> "wiringbits@wiringbits.net", + TableColumn("phone_number", ColumnType.parseColumnType("text")) -> "null" ) val primaryKeyField = "user_id"