Skip to content

Commit d60d802

Browse files
authored
Merge branch 'main' into add-image-input-facade
2 parents 16c19c5 + f95c926 commit d60d802

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

Diff for: .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"

Diff for: spra-play-server/src/test/scala/controllers/AdminControllerSpec.scala

+8-5
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
670670
}
671671

672672
"don't fail if we send a null in an optional parameter" in withApiClient { client =>
673-
val json = """{"name":"wiringbits","email":null,"password":"wiringbits"}"""
673+
val json = """{"name":"wiringbits","last_name":null,"email":"[email protected]","password":"wiringbits"}"""
674674
val path = s"/admin/tables/${usersSettings.tableName}"
675675
val response = POST(path, json).futureValue
676676
response.header.status mustBe 200
@@ -679,8 +679,9 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
679679
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
680680

681681
responseMetadata.head.nonEmpty mustBe true
682+
responseMetadata.head("last_name") mustBe ""
682683
}
683-
684+
684685
"return new user id" in withApiClient { implicit client =>
685686
val user = createUser.futureValue
686687
val response = client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
@@ -802,23 +803,25 @@ class AdminControllerSpec extends PlayPostgresSpec with AdminUtils {
802803

803804
"don't fail if we send a null in an optional parameter" in withApiClient { client =>
804805
val name = "wiringbits"
806+
val lastName = "test"
805807
val email = "[email protected]"
806808
val password = "wiringbits"
807-
val request = AdminCreateTable.Request(Map("name" -> name, "email" -> email, "password" -> password))
809+
val request =
810+
AdminCreateTable.Request(Map("name" -> name, "last_name" -> lastName, "email" -> email, "password" -> password))
808811
client.createItem("users", request).futureValue
809812
val responseMetadata1 =
810813
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
811814
val id = responseMetadata1.head("id")
812815

813-
val json = """{"email":null}"""
816+
val json = """{"last_name":"null"}"""
814817
val path = s"/admin/tables/${usersSettings.tableName}/$id"
815818
val response = PUT(path, json).futureValue
816819
response.header.status mustBe 200
817820

818821
val responseMetadata2 =
819822
client.getTableMetadata(usersSettings.tableName, List("name", "ASC"), List(0, 9), "{}").futureValue
820823

821-
responseMetadata2.head("email") mustBe ""
824+
responseMetadata2.head("last_name") mustBe ""
822825
}
823826

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

0 commit comments

Comments
 (0)