Skip to content

Commit 036b731

Browse files
authored
Merge branch 'main' into fix-handle-bytea-storage
2 parents ea05bf3 + f95c926 commit 036b731

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
@@ -687,7 +687,7 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
687687
}
688688

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

698698
responseMetadata.head.nonEmpty mustBe true
699+
responseMetadata.head("last_name") mustBe ""
699700
}
700701

701702
"return new user id" in withApiClient { implicit client =>
@@ -847,23 +848,25 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
847848

848849
"don't fail if we send a null in an optional parameter" in withApiClient { client =>
849850
val name = "wiringbits"
851+
val lastName = "test"
850852
val email = "[email protected]"
851853
val password = "wiringbits"
852-
val request = AdminCreateTable.Request(Map("name" -> name, "email" -> email, "password" -> password))
854+
val request =
855+
AdminCreateTable.Request(Map("name" -> name, "last_name" -> lastName, "email" -> email, "password" -> password))
853856
client.createItem("users", request).futureValue
854857
val responseMetadata1 =
855858
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
856859
val id = responseMetadata1.head("id")
857860

858-
val json = """{"email":null}"""
861+
val json = """{"last_name":"null"}"""
859862
val path = s"/admin/tables/${usersSettings.tableName}/$id"
860863
val response = PUT(path, json).futureValue
861864
response.header.status mustBe 200
862865

863866
val responseMetadata2 =
864867
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
865868

866-
responseMetadata2.head("email") mustBe ""
869+
responseMetadata2.head("last_name") mustBe ""
867870
}
868871

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

0 commit comments

Comments
 (0)