Skip to content

Commit 0546ae0

Browse files
authored
Merge branch 'main' into filtering-by-non-string-column
2 parents e270d6c + f95c926 commit 0546ae0

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/pull_request.yml

+6
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ jobs:
3737

3838
- name: Run tests
3939
run: CI=true sbt +test
40+
41+
- name: Test summary
42+
if: always() # Always run, even if previous steps failed
43+
uses: test-summary/action@v2
44+
with:
45+
paths: "**/target/test-reports/*.xml"

spra-play-server/src/test/scala/controllers/AdminControllerSpec.scala

+7-4
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
770770
}
771771

772772
"don't fail if we send a null in an optional parameter" in withApiClient { client =>
773-
val json = """{"name":"wiringbits","email":null,"password":"wiringbits"}"""
773+
val json = """{"name":"wiringbits","last_name":null,"email":"[email protected]","password":"wiringbits"}"""
774774
val path = s"/admin/tables/${usersSettings.tableName}"
775775
val response = POST(path, json).futureValue
776776
response.header.status mustBe 200
@@ -779,6 +779,7 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
779779
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
780780

781781
responseMetadata.head.nonEmpty mustBe true
782+
responseMetadata.head("last_name") mustBe ""
782783
}
783784

784785
"return new user id" in withApiClient { implicit client =>
@@ -902,23 +903,25 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
902903

903904
"don't fail if we send a null in an optional parameter" in withApiClient { client =>
904905
val name = "wiringbits"
906+
val lastName = "test"
905907
val email = "[email protected]"
906908
val password = "wiringbits"
907-
val request = AdminCreateTable.Request(Map("name" -> name, "email" -> email, "password" -> password))
909+
val request =
910+
AdminCreateTable.Request(Map("name" -> name, "last_name" -> lastName, "email" -> email, "password" -> password))
908911
client.createItem("users", request).futureValue
909912
val responseMetadata1 =
910913
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
911914
val id = responseMetadata1.head("id")
912915

913-
val json = """{"email":null}"""
916+
val json = """{"last_name":"null"}"""
914917
val path = s"/admin/tables/${usersSettings.tableName}/$id"
915918
val response = PUT(path, json).futureValue
916919
response.header.status mustBe 200
917920

918921
val responseMetadata2 =
919922
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
920923

921-
responseMetadata2.head("email") mustBe ""
924+
responseMetadata2.head("last_name") mustBe ""
922925
}
923926

924927
"fail if the field in body doesn't exists" in withApiClient { client =>

0 commit comments

Comments
 (0)