Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio171003 committed Sep 11, 2024
1 parent 6864ff8 commit 40dd0d4
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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}
Expand All @@ -20,7 +21,10 @@ class QueryBuilderSpec extends AnyWordSpec {
|""".stripMargin
val tableName = "users"
val body =
Map(TableColumn("email", "citext") -> "[email protected]", TableColumn("name", "text") -> "wiringbits")
Map(
TableColumn("email", ColumnType.parseColumnType("citext")) -> "[email protected]",
TableColumn("name", ColumnType.parseColumnType("text")) -> "wiringbits"
)
val primaryKeyField = "user_id"

val response = QueryBuilder.create(tableName, body, primaryKeyField)
Expand Down Expand Up @@ -58,8 +62,8 @@ class QueryBuilderSpec extends AnyWordSpec {
|""".stripMargin
val tableName = "users"
val body = Map(
TableColumn("email", "citext") -> "[email protected]",
TableColumn("name", "text") -> "[email protected]"
TableColumn("email", ColumnType.parseColumnType("citext")) -> "[email protected]",
TableColumn("name", ColumnType.parseColumnType("text")) -> "[email protected]"
)
val primaryKeyField = "user_id"

Expand All @@ -76,9 +80,9 @@ class QueryBuilderSpec extends AnyWordSpec {
|""".stripMargin
val tableName = "users"
val body = Map(
TableColumn("email", "citext") -> "[email protected]",
TableColumn("name", "text") -> "[email protected]",
TableColumn("phone_number", "text") -> "null"
TableColumn("email", ColumnType.parseColumnType("citext")) -> "[email protected]",
TableColumn("name", ColumnType.parseColumnType("text")) -> "[email protected]",
TableColumn("phone_number", ColumnType.parseColumnType("text")) -> "null"
)
val primaryKeyField = "user_id"

Expand Down

0 comments on commit 40dd0d4

Please sign in to comment.